| 1 | <!DOCTYPE html> |
| 2 | <html> |
| 3 | <head> |
| 4 | <title>ProFTPD Logging: Log Levels</title> |
| 5 | </head> |
| 6 | |
| 7 | <body bgcolor=white> |
| 8 | |
| 9 | <hr> |
| 10 | <center><h2><b>ProFTPD Logging: Log Levels</b></h2></center> |
| 11 | <hr> |
| 12 | |
| 13 | <p> |
| 14 | <b>Log Levels</b> |
| 15 | As mentioned in the <a href="Logging.html#Syslog">logging</a> documentation, |
| 16 | log messages are logged at different <em>log levels</em> (also known as |
| 17 | log <em>priorities</em>), and with different <em>facilities</em> (<i>i.e.</i> |
| 18 | the component generating the log message). |
| 19 | |
| 20 | <p> |
| 21 | The following table lists the supported log levels, in descending priority |
| 22 | order. Thus the <code>DEBUG</code> level has the lowest priority, and the |
| 23 | <code>EMERG</code> level has the highest priority. |
| 24 | |
| 25 | <p> |
| 26 | <table border=1 summary="Log Levels"> |
| 27 | <tr> |
| 28 | <td><b> Level </b></td> |
| 29 | <td><b> Description </b></td> |
| 30 | </tr> |
| 31 | |
| 32 | <tr> |
| 33 | <td> <code>EMERG</code> </td> |
| 34 | <td> Fatal/unrecoverable error/condition, application is unusable and |
| 35 | stops immediately </td> |
| 36 | </tr> |
| 37 | |
| 38 | <tr> |
| 39 | <td> <code>ALERT</code> </td> |
| 40 | <td> Condition requires <b>immediate</b> intervention by |
| 41 | administrator/operator </td> |
| 42 | </tr> |
| 43 | |
| 44 | <tr> |
| 45 | <td> <code>CRIT</code> </td> |
| 46 | <td> Condition <b>should</b> be corrected immediately, but indicates |
| 47 | <i>e.g.</i> failure in secondary system/library </td> |
| 48 | </tr> |
| 49 | |
| 50 | <tr> |
| 51 | <td> <code>ERR</code> </td> |
| 52 | <td> Non-urgent failure conditions that should be relayed to developers |
| 53 | and/or administrators; <b>should</b> be resolved/corrected soon </td> |
| 54 | </tr> |
| 55 | |
| 56 | <tr> |
| 57 | <td> <code>WARNING</code> </td> |
| 58 | <td> Unexpected error/condition that <i>may</i> require intervention to |
| 59 | review/correct </td> |
| 60 | </tr> |
| 61 | |
| 62 | <tr> |
| 63 | <td> <code>NOTICE</code> </td> |
| 64 | <td> Significant/noteworthy condition, no intervention/action |
| 65 | required </td> |
| 66 | </tr> |
| 67 | |
| 68 | <tr> |
| 69 | <td> <code>INFO</code> </td> |
| 70 | <td> Normal operating conditions, no intervention/action |
| 71 | required </td> |
| 72 | </tr> |
| 73 | |
| 74 | <tr> |
| 75 | <td> <code>DEBUG</code> </td> |
| 76 | <td> Internal details of application operations useful to developers, |
| 77 | not necessarily useful during normal operations </td> |
| 78 | </tr> |
| 79 | </table> |
| 80 | |
| 81 | <p> |
| 82 | The <code>proftpd</code> daemon can use any or all of the above log levels for |
| 83 | its emitted log messages, depending on the situation. You might find that |
| 84 | you only want <code>proftpd</code> to log messages above a certain level; for |
| 85 | example, you might not be interested in <code>INFO</code> and <code>DEBUG</code> |
| 86 | level messages. ProFTPD logs all levels by default. To tell |
| 87 | <code>proftpd</code> to silently ignore all log messages below a certain level, |
| 88 | use the <a href="../modules/mod_core.html#SyslogLevel"><code>SyslogLevel</code></a> directive. Thus to ignore <code>INFO</code>/<code>DEBUG</code> messages, |
| 89 | you would use: |
| 90 | <pre> |
| 91 | SyslogLevel notice |
| 92 | </pre> |
| 93 | |
| 94 | <p> |
| 95 | Note that additional log filtering is also done by the <code>syslogd</code> |
| 96 | daemon, to which <code>proftpd</code> logs by default. You will need to |
| 97 | consult your <code>syslogd</code> configuration (typically found in |
| 98 | <code>/etc/syslog.conf</code>) to see whether it is capturing log messages |
| 99 | from the facility used by <code>proftpd</code> (default is "daemon"), and |
| 100 | whether it is filtering out messages below a certain level/priority. |
| 101 | |
| 102 | <p> |
| 103 | If you need to tell <code>proftpd</code> to use a different facility, |
| 104 | so that it matches your <code>/etc/syslog.conf</code> settings for example, |
| 105 | you can use the <a href="../modules/mod_core.html#SyslogFacility"><code>SyslogFacility</code></a> directive like so: |
| 106 | <pre> |
| 107 | # Tell proftpd to log using the "ftp" facility, rather than "daemon" |
| 108 | SyslogFacility ftp |
| 109 | </pre> |
| 110 | |
| 111 | <p><a name="DebugLevel"> |
| 112 | <b>The <code>DEBUG</code> Level</b><br> |
| 113 | ProFTPD treats the <code>DEBUG</code> log level a little differently. There |
| 114 | are so many conditions which are relevant only when triaging a specific issue |
| 115 | (such as figuring out why a user cannot log in, or why a file cannot be |
| 116 | uploaded) that the <code>DEBUG</code> level would become cluttered. Additional |
| 117 | filtering of these debug messages is needed. Thus ProFTPD imposes its own |
| 118 | notion of debug levels within the <code>DEBUG</code> logging level/priority. |
| 119 | |
| 120 | <p> |
| 121 | The <a href="../modules/mod_core.html#DebugLevel"><code>DebugLevel</code></a> |
| 122 | directive is used to control the granularity/verbosity of the <code>DEBUG</code> |
| 123 | level messages; the default level is 0, and goes to 10 (inclusive). In general, |
| 124 | the higher the <code>DebugLevel</code>, the more debug messages will be emitted |
| 125 | by <code>proftpd</code> to the <code>DEBUG</code> logging level/priority. |
| 126 | |
| 127 | <p><a name="TraceLog"> |
| 128 | <b>Additional Logging</b><br> |
| 129 | Note that ProFTPD also supports even finer-grained logging of internals via |
| 130 | its <a href="Tracing.html">trace logging</a>. Trace logging, however, is |
| 131 | completely unrelated to <code>syslogd</code>, and thus the syslog |
| 132 | <em>facility</em> and <em>level</em> concepts/filtering do <b>not</b> apply |
| 133 | to trace logging. |
| 134 | |
| 135 | <p> |
| 136 | <hr> |
| 137 | <font size=2><b><i> |
| 138 | © Copyright 2013-2019 The ProFTPD Project<br> |
| 139 | All Rights Reserved<br> |
| 140 | </i></b></font> |
| 141 | <hr> |
| 142 | |
| 143 | </body> |
| 144 | </html> |