Edgewall Software

Changes between Version 20 and Version 21 of TracLogging


Ignore:
Timestamp:
Mar 13, 2017, 11:48:38 PM (6 years ago)
Author:
Ryan J Ollos
Comment:

Minor editing.

Legend:

Unmodified
Added
Removed
Modified
  • TracLogging

    v20 v21  
    33[[TranslatedPages]]
    44
    5 Trac supports logging of system messages using the standard [http://docs.python.org/library/logging.html logging module] that comes with Python.
     5Trac supports logging of system messages using Python's [http://docs.python.org/library/logging.html logging module].
    66
    7 Logging is configured in the `[logging]` section in [wiki:TracIni#logging-section trac.ini].
     7Logging is configured in the [TracIni#logging-section "[logging]"] section of TracIni.
    88
    99== Supported Logging Methods
    1010
    11 The log method is set using the `log_type` option in [wiki:TracIni#logging-section trac.ini], which takes any of the following values:
     11The log method is set using the [TracIni#logging-log_type-option "[logging] log_type"] option, which accepts the following values:
    1212
    1313 '''none'':: Suppress all log messages.
    14  '''file''':: Log messages to a file, specified with the `log_file` option in [wiki:TracIni#logging-section trac.ini]. Relative paths in `log_file` are resolved relative to the `log` directory of the environment.
    15  '''stderr''':: Output all log entries to console ([wiki:TracStandalone tracd] only).
    16  '''syslog''':: (UNIX) Send all log messages to the local syslogd via named pipe `/dev/log`. By default, syslog will write them to the file /var/log/messages.
    17  '''eventlog''':: (Windows) Use the system's NT Event Log for Trac logging.
     14 '''file''':: Log messages to a file, specified with the [TracIni#logging-log_file-option "[logging] log_file"] option. Relative paths for `log_file` are resolved relative to the environment `log` directory.
     15 '''stderr''':: Output log entries to console ([TracStandalone tracd] only).
     16 '''syslog''':: (UNIX) Send log messages to the local syslogd via named pipe `/dev/log`. By default, syslog will write them to the `/var/log/messages` file.
     17 '''eventlog''':: (Windows) Use the system's NT Event Log.
    1818
    1919== Log Levels
    2020
    21 The verbosity level of logged messages can be set using the `log_level` option in [wiki:TracIni#logging-section trac.ini]. The log level defines the minimum level of urgency required for a message to be logged, and those levels are:
     21The 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:
    2222
    2323 '''CRITICAL''':: Log only the most critical (typically fatal) errors.
     
    2727 '''DEBUG''':: Trace messages, profiling, etc.
    2828
    29 Additionally, you can  enable logging of SQL statements at debug level. This is turned off by default, as it's very verbose. Set `[trac] debug_sql = yes` in TracIni to activate.
     29Additionally, 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.
    3030
    3131== Log Format
    3232
    33 The output format for log entries can be specified through the `log_format` option in [wiki:TracIni#logging-section trac.ini]. The format is a string which can contain any of the [http://docs.python.org/library/logging.html#logrecord-attributes Python logging Formatter variables]. Additonally, the following Trac-specific variables can be used:
    34  '''$(basename)s''':: The last path component of the current environment.
    35  '''$(path)s''':: The absolute path for the current environment.
     33The output format for log entries can be specified in the [TracIni#logging-log_format-option "[logging] log_format"] option. The format is a string which can contain any of the [https://docs.python.org/2/library/logging.html#logrecord-attributes Python logging Formatter variables]. Additionally, the following Trac-specific variables can be used:
     34 '''$(basename)s''':: The environment directory name.
     35 '''$(path)s''':: The absolute path of the environment directory.
    3636 '''$(project)s''':: The originating project's name.
    3737
     
    4949
    5050----
    51 See also: TracIni, TracGuide, TracEnvironment
     51See also: TracIni, TracEnvironment