root/releases/pkgcore/0.2.4/pkgcore/log.py @ marienz%2540gentoo.org-20061031181745-cead7a3a6d1d956d

Revision marienz%2540gentoo.org-20061031181745-cead7a3a6d1d956d, 0.6 KB (checked in by Marien Zwart <marienz@…>, 2 years ago)

Use our own logger instead of the root logger.

Line 
1# Copyright: 2006 Marien Zwart <marienz@gentoo.org>
2# License: GPL2
3
4
5"""Logging utilities.
6
7Currently just contains pkgcore's root logger.
8"""
9
10
11import 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.
18logging.basicConfig()
19
20# Our main logger.
21logger = logging.getLogger('pkgcore')
Note: See TracBrowser for help on using the browser.