trac-ticketlinks / wiki-default / TracLogging

= Trac Logging =

Trac supports logging of system messages using the standard [ logging module] that comes with Python.

Logging is configured in the {{{[logging]}}} section in [wiki:TracIni trac.ini].

== Supported Logging Methods ==

The log method is set using the `log_type` configuration option, which takes any of the following values:
 '''none'':: Suppress all log messages.
 '''file''':: Log messages to a file, specified with the `log_file` option in [wiki:TracIni trac.ini]. 
 '''stderr''':: Output all log entries to console ([wiki:TracStandalone tracd] only).
 '''syslog''':: (UNIX) Send messages to local syslogd via named pipe `/dev/log`.
 '''eventlog''':: (Windows) Use the system's NT eventlog for Trac logging.

== Log Levels ==

The verbosity level of logged messages can be set using the ''log_level'' directive in [wiki:TracIni trac.ini]. The log level defines the minimum level of urgency required for a message to be logged.

The levels are:
 '''CRITICAL''':: Log only the most critical (typically fatal) errors.
 '''ERROR''':: Log failures, bugs and errors. 
 '''WARN''':: Log warnings, non-interrupting events.
 '''INFO''':: Diagnostic information, log information about all processing.
 '''DEBUG''':: Trace messages, profiling, etc.

See also: TracIni, TracGuide, TracEnvironment
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.