| Line | |
|---|
| 1 | # Copyright: 2006 Marien Zwart <marienz@gentoo.org> |
|---|
| 2 | # License: GPL2 |
|---|
| 3 | |
|---|
| 4 | |
|---|
| 5 | """Logging utilities. |
|---|
| 6 | |
|---|
| 7 | Currently just contains pkgcore's root logger. |
|---|
| 8 | """ |
|---|
| 9 | |
|---|
| 10 | |
|---|
| 11 | import logging |
|---|
| 12 | |
|---|
| 13 | # The logging system will call this automagically if its module-level |
|---|
| 14 | # logging functions are used. We call it explicitly to make sure |
|---|
| 15 | # something handles messages sent to our non-root logger. If the root |
|---|
| 16 | # logger already has handlers this is a noop, and if someone attaches |
|---|
| 17 | # a handler to our pkgcore logger that overrides the root logger handler. |
|---|
| 18 | logging.basicConfig() |
|---|
| 19 | |
|---|
| 20 | # Our main logger. |
|---|
| 21 | logger = logging.getLogger('pkgcore') |
|---|