| | 1 | = Trac Logging = |
| | 2 | |
| | 3 | [[TracGuideToc]] |
| | 4 | |
| | 5 | |
| | 6 | |
| | 7 | Trac supports logging of system messages using the standard [http://docs.python.org/lib/module-logging.html logging module] that comes with Python. |
| | 8 | |
| | 9 | |
| | 10 | |
| | 11 | Logging is configured in the {{{[logging]}}} section in [wiki:TracIni trac.ini]. |
| | 12 | |
| | 13 | |
| | 14 | |
| | 15 | == Supported Logging Methods == |
| | 16 | |
| | 17 | |
| | 18 | |
| | 19 | The log method is set using the `log_type` configuration option, which takes any of the following values: |
| | 20 | |
| | 21 | '''none'':: Suppress all log messages. |
| | 22 | |
| | 23 | '''file''':: Log messages to a file, specified with the `log_file` option in [wiki:TracIni trac.ini]. |
| | 24 | |
| | 25 | '''stderr''':: Output all log entries to console ([wiki:TracStandalone tracd] only). |
| | 26 | |
| | 27 | '''syslog''':: (UNIX) Send messages to local syslogd via named pipe `/dev/log`. |
| | 28 | |
| | 29 | '''eventlog''':: (Windows) Use the system's NT eventlog for Trac logging. |
| | 30 | |
| | 31 | |
| | 32 | |
| | 33 | == Log Levels == |
| | 34 | |
| | 35 | |
| | 36 | |
| | 37 | 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. |
| | 38 | |
| | 39 | |
| | 40 | |
| | 41 | The levels are: |
| | 42 | |
| | 43 | '''CRITICAL''':: Log only the most critical (typically fatal) errors. |
| | 44 | |
| | 45 | '''ERROR''':: Log failures, bugs and errors. |
| | 46 | |
| | 47 | '''WARN''':: Log warnings, non-interrupting events. |
| | 48 | |
| | 49 | '''INFO''':: Diagnostic information, log information about all processing. |
| | 50 | |
| | 51 | '''DEBUG''':: Trace messages, profiling, etc. |
| | 52 | |
| | 53 | |
| | 54 | |
| | 55 | ---- |
| | 56 | |
| | 57 | See also: TracIni, TracGuide, TracEnvironment |
| | 58 | |