Changes between Version 2 and Version 3 of TracLogging


Ignore:
Timestamp:
Mar 27, 2024, 3:32:45 PM (4 weeks ago)
Author:
trac
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • TracLogging

    v2 v3  
    22[[TracGuideToc]]
    33
    4 Trac supports logging of system messages using Python's [http://docs.python.org/library/logging.html logging module].
     4Trac supports logging of system messages using Python's [https://docs.python.org/2/library/logging.html logging module].
    55
    66Logging is configured in the [TracIni#logging-section "[logging]"] section of TracIni.
     
    1818== Log Levels
    1919
    20 The verbosity level of logged messages can be set using the [TracIni#logging-log_level-option "[logging] log_level"] option. The log level defines the minimum level of urgency required for a message to be logged, and those levels are:
     20The verbosity level of logged messages can be set using the [TracIni#logging-log_level-option "[logging] log_level"] option. The log level defines the minimum level of urgency required for a message to be logged:
    2121
    2222 '''CRITICAL''':: Log only the most critical (typically fatal) errors.
    23  '''ERROR''':: Log failures, bugs and errors. 
     23 '''ERROR''':: Log failures, bugs and errors.
    2424 '''WARN''':: Log warnings, non-interrupting events.
    2525 '''INFO''':: Diagnostic information, log information about all processing.
    2626 '''DEBUG''':: Trace messages, profiling, etc.
    2727
    28 Additionally, you can  enable logging of SQL statements at debug level. This is turned off by default, as it's very verbose. Set [TracIni#trac-debug_sql-option "[trac] debug_sql  = yes"] to activate.
     28Additionally, you can enable logging of SQL statements at debug level. This is turned off by default, as it's very verbose. Set [TracIni#trac-debug_sql-option "[trac] debug_sql  = yes"] to activate.
    2929
    3030== Log Format
     
    4242}}}
    4343
    44 In a multi-project environment where all logs are sent to the same place (e.g. `syslog`), it makes sense to add the project name. In this example we use `basename` since that can generally be used to identify a project:
     44In a multi-project environment where all logs are sent to the same place (e.g. `syslog`), it makes sense to add the project name. In this example we use `basename` as that can generally be used to identify a project:
    4545{{{#!ini
    4646log_format = Trac[$(basename)s:$(module)s] $(levelname)s: $(message)s