Differences

This shows you the differences between two versions of the page.

Link to this comparison view

loggingconf [2014/10/26 01:52] (current)
Line 1: Line 1:
 +==== Python logging config file ====
 +<​code>​
 +[formatters]
 +keys: detailed,​simple
 + 
 +[handlers]
 +keys: console,​syslog,​file
 + 
 +[loggers]
 +keys: root,​gui,​engine,​file
 + 
 +[formatter_simple]
 +format: %(name)s:​%(levelname)s: ​ %(message)s
 + 
 +[formatter_detailed]
 +format: %(name)s:​%(levelname)s %(module)s:​%(lineno)d: ​ %(message)s
 + 
 +[handler_file]
 +class: FileHandler
 +args: ['​pylog.log','​a'​]
 +formatter: simple
 +
 +[handler_console]
 +class: StreamHandler
 +args: []
 +formatter: simple
 + 
 +[handler_syslog]
 +class: handlers.SysLogHandler
 +args: [('​myhost.mycorp.net',​ handlers.SYSLOG_UDP_PORT),​ handlers.SysLogHandler.LOG_USER]
 +formatter: detailed
 + 
 +[logger_root]
 +level: INFO
 +handlers: file
 + 
 +[logger_gui]
 +level: WARNING
 +qualname: pi.basil.gui
 +handlers: console
 + 
 +[logger_engine]
 +level: INFO
 +qualname: pi.basil
 +handlers: console
 +
 +[logger_file]
 +level: DEBUG
 +qualname: mylog
 +handlers: file
 +</​code>​
 +----
 +  * [[pythoninfo|Back to Python]]
  
loggingconf.txt ยท Last modified: 2014/10/26 01:52 (external edit)
CC Attribution-Share Alike 3.0 Unported
www.chimeric.de Valid CSS Driven by DokuWiki do yourself a favour and use a real browser - get firefox!! Recent changes RSS feed Valid XHTML 1.0