Changes between Version 4 and Version 5 of LoggingBestPractice


Ignore:
Timestamp:
14/08/06 16:37:48 (13 years ago)
Author:
spascoe
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • LoggingBestPractice

    v4 v5  
    11= Logging Best Practice = 
    22 
    3 A simple logging class already exists at [source:/TI12-security/trunk/python/NDG/Log.py], however far greater functionality and flexibility can be achieved by useing the python [http://docs.python.org/lib/module-logging.html logging] package.  All developers should familiarise themselves with this package document: in particular read the introduction because understanding the class-level pages is difficult without it.  The discussion below assumes familiarity with the basics. 
     3A simple logging class already exists at [source:/TI12-security/trunk/python/NDG/Log.py], however far greater functionality and flexibility can be achieved by useing the python [http://docs.python.org/lib/module-logging.html logging] package.  All developers should familiarise themselves with this package document: in particular read the introduction because understanding the class-level pages is difficult without it.  There is also a good introductory article [http://www.onlamp.com/pub/a/python/2005/06/02/logging.html here].  The discussion below assumes familiarity with the basics. 
    44 
    55The key advantages of using the logging package is that when plugging packages together (such as dx and security) messages can be sent to different loggers in a logger heirarchy allowing decisions on how different messages are logged to be made by the application (script, webservice, etc) rather than the low-level module generating the message.