Re: How to package a logging.config file?



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 their logging, you may get unexpected results.

I thought that the point of using logging.getLogger('foo.bar.baz') was
to allow each module/class/function to choose from the available
configurations.

So, I can define a really weird logger and still be a good citizen.

As long as I don't tweak the root logger, is it safe to use a config
file?

Matt

.



Relevant Pages

  • Re: log4net mysteriously stops logging
    ... Since the guy who put the logging in did this, the rest of us just carried it through. ... We call XmlConfigurator.Configure and pass it the FileInfo object that represents the config file. ... With the debugging in log4net enabled, ...
    (microsoft.public.dotnet.general)
  • Re: PIX DHCP/Failover boot issue
    ... Pull down a sample config from a 501, it does DHCP out of the box and works ... I do not see amything in your config that tells me failover is ... > fixup protocol http 80 ... > no logging timestamp ...
    (comp.security.firewalls)
  • Re: PIX DHCP/Failover boot issue
    ... Pull down a sample config from a 501, it does DHCP out of the box and works ... I do not see amything in your config that tells me failover is ... > fixup protocol http 80 ... > no logging timestamp ...
    (comp.security.unix)
  • Re: Syslog not logging remote host
    ... I'm trying capture logs from m0n0wall, but the log file is empty. ... On the logging machine, in /etc/rc.conf: ... then double-check your config on the monowall machine. ... A block will only log messages corresponding to ...
    (freebsd-questions)
  • Re: [ANNOUNCE] udev 016 release
    ... patch to make logging a config option. ... send the line "unsubscribe linux-kernel" in ...
    (Linux-Kernel)