Re: How to package a logging.config file?
- From: Vinay Sajip <vinay_sajip@xxxxxxxxxxx>
- Date: Mon, 14 Jul 2008 06:25:19 -0700 (PDT)
On Jul 14, 1:21 am, Matthew Wilson <m...@xxxxxxxxxx> 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 really obvious to me that this won't work when I share
this package with others.
I can't figure out what path to use when I load my .cfg file.
Any ideas?
Matt
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 their logging, you may get unexpected results.
If it's an application, then Larry's advice is good.
Regards,
Vinay Sajip
.
- Follow-Ups:
- Re: How to package a logging.config file?
- From: Matthew Wilson
- Re: How to package a logging.config file?
- References:
- How to package a logging.config file?
- From: Matthew Wilson
- How to package a logging.config file?
- Prev by Date: Re: a module.pth question
- Next by Date: trying to use sax for a very basic first xml parser
- Previous by thread: Re: How to package a logging.config file?
- Next by thread: Re: How to package a logging.config file?
- Index(es):
Relevant Pages
|