How to package a logging.config file?



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 I share
this package with others.

I can't figure out what path to use when I load my .cfg file.

Any ideas?

Matt
.



Relevant Pages

  • RE: How to package a logging.config file?
    ... will fail in an exception without configuring logging module. ... How to package a logging.config file? ... I'm working on a package that uses the standard library logging module ... I can't figure out what path to use when I load my .cfg file. ...
    (comp.lang.python)
  • Re: How to package a logging.config file?
    ... I can't figure out what path to use when I load my .cfg file. ... Is your package a library or an application? ... should avoid configuring logging using a config file - this is because ...
    (comp.lang.python)