On Jul 15, 3:04 pm, Matthew Wilson <[EMAIL PROTECTED]> wrote:
> On Mon 14 Jul 2008 09:25:19 AM EDT, Vinay Sajip wrote:
>
> > Is your package a library or an application? If it's a library, you
> > should avoid configuringloggingusing a config file - this is because
> >loggingconfiguration is proces
On Mon 14 Jul 2008 09:25:19 AM EDT, Vinay Sajip wrote:
> Is your package a library or an application? If it's a library, you
> should avoid configuring logging using a config file - this is because
> logging configuration is process-wide, and if multiple libraries use
> fileConfig to configure thei
I had the similar question and my solution is:
default_config = os.path.join(os.getcwd(), "log.config")
def get_logger(name, config_file=None):
if config_file:
logging.config.fileConfig(config_file)
else:
logging.basicConfig(level=logging.INFO,
On Jul 14, 1:21 am, Matthew Wilson <[EMAIL PROTECTED]> wrote:
> I'm working on a package that uses the standard libraryloggingmodule
> along with a .cfg file.
>
> In my code, I uselogging.config.fileConfig('/home/matt/mypackage/matt.cfg')
> to load in
> theloggingconfig file.
>
> However, it seems
Matthew Wilson wrote:
I'm working on a package that uses the standard library logging module
along with a .cfg file.
In my code, I use
logging.config.fileConfig('/home/matt/mypackage/matt.cfg') to load in
the logging config file.
However, it seems really obvious to me that this won't work when