1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
|
<h1>Logging HOWTO</h1> <dl class="field-list simple"> <dt class="field-odd">Author</dt> <dd class="field-odd">
<p>Vinay Sajip <vinay_sajip at red-dove dot com></p> </dd> </dl> <p id="logging-basic-tutorial">This page contains tutorial information. For links to reference information and a logging cookbook, please see <a class="reference internal" href="#tutorial-ref-links"><span class="std std-ref">Other resources</span></a>.</p> <section id="basic-logging-tutorial"> <h2>Basic Logging Tutorial</h2> <p>Logging is a means of tracking events that happen when some software runs. The software’s developer adds logging calls to their code to indicate that certain events have occurred. An event is described by a descriptive message which can optionally contain variable data (i.e. data that is potentially different for each occurrence of the event). Events also have an importance which the developer ascribes to the event; the importance can also be called the <em>level</em> or <em>severity</em>.</p> <section id="when-to-use-logging"> <h3>When to use logging</h3> <p>Logging provides a set of convenience functions for simple logging usage. These are <a class="reference internal" href="../library/logging#logging.debug" title="logging.debug"><code>debug()</code></a>, <a class="reference internal" href="../library/logging#logging.info" title="logging.info"><code>info()</code></a>, <a class="reference internal" href="../library/logging#logging.warning" title="logging.warning"><code>warning()</code></a>, <a class="reference internal" href="../library/logging#logging.error" title="logging.error"><code>error()</code></a> and <a class="reference internal" href="../library/logging#logging.critical" title="logging.critical"><code>critical()</code></a>. To determine when to use logging, see the table below, which states, for each of a set of common tasks, the best tool to use for it.</p> <table class="docutils align-default"> <thead> <tr>
<th class="head"><p>Task you want to perform</p></th> <th class="head"><p>The best tool for the task</p></th> </tr> </thead> <tr>
<td><p>Display console output for ordinary usage of a command line script or program</p></td> <td><p><a class="reference internal" href="../library/functions#print" title="print"><code>print()</code></a></p></td> </tr> <tr>
<td><p>Report events that occur during normal operation of a program (e.g. for status monitoring or fault investigation)</p></td> <td><p><a class="reference internal" href="../library/logging#logging.info" title="logging.info"><code>logging.info()</code></a> (or <a class="reference internal" href="../library/logging#logging.debug" title="logging.debug"><code>logging.debug()</code></a> for very detailed output for diagnostic purposes)</p></td> </tr> <tr>
<td><p>Issue a warning regarding a particular runtime event</p></td> <td>
<p><a class="reference internal" href="../library/warnings#warnings.warn" title="warnings.warn"><code>warnings.warn()</code></a> in library code if the issue is avoidable and the client application should be modified to eliminate the warning</p> <p><a class="reference internal" href="../library/logging#logging.warning" title="logging.warning"><code>logging.warning()</code></a> if there is nothing the client application can do about the situation, but the event should still be noted</p> </td> </tr> <tr>
<td><p>Report an error regarding a particular runtime event</p></td> <td><p>Raise an exception</p></td> </tr> <tr>
<td><p>Report suppression of an error without raising an exception (e.g. error handler in a long-running server process)</p></td> <td><p><a class="reference internal" href="../library/logging#logging.error" title="logging.error"><code>logging.error()</code></a>, <a class="reference internal" href="../library/logging#logging.exception" title="logging.exception"><code>logging.exception()</code></a> or <a class="reference internal" href="../library/logging#logging.critical" title="logging.critical"><code>logging.critical()</code></a> as appropriate for the specific error and application domain</p></td> </tr> </table> <p>The logging functions are named after the level or severity of the events they are used to track. The standard levels and their applicability are described below (in increasing order of severity):</p> <table class="docutils align-default"> <thead> <tr>
<th class="head"><p>Level</p></th> <th class="head"><p>When it’s used</p></th> </tr> </thead> <tr>
<td><p><code>DEBUG</code></p></td> <td><p>Detailed information, typically of interest only when diagnosing problems.</p></td> </tr> <tr>
<td><p><code>INFO</code></p></td> <td><p>Confirmation that things are working as expected.</p></td> </tr> <tr>
<td><p><code>WARNING</code></p></td> <td><p>An indication that something unexpected happened, or indicative of some problem in the near future (e.g. ‘disk space low’). The software is still working as expected.</p></td> </tr> <tr>
<td><p><code>ERROR</code></p></td> <td><p>Due to a more serious problem, the software has not been able to perform some function.</p></td> </tr> <tr>
<td><p><code>CRITICAL</code></p></td> <td><p>A serious error, indicating that the program itself may be unable to continue running.</p></td> </tr> </table> <p>The default level is <code>WARNING</code>, which means that only events of this level and above will be tracked, unless the logging package is configured to do otherwise.</p> <p>Events that are tracked can be handled in different ways. The simplest way of handling tracked events is to print them to the console. Another common way is to write them to a disk file.</p> </section> <section id="a-simple-example"> <span id="howto-minimal-example"></span><h3>A simple example</h3> <p>A very simple example is:</p> <pre data-language="python">import logging
logging.warning('Watch out!') # will print a message to the console
logging.info('I told you so') # will not print anything
</pre> <p>If you type these lines into a script and run it, you’ll see:</p> <pre data-language="none">WARNING:root:Watch out!
</pre> <p>printed out on the console. The <code>INFO</code> message doesn’t appear because the default level is <code>WARNING</code>. The printed message includes the indication of the level and the description of the event provided in the logging call, i.e. ‘Watch out!’. Don’t worry about the ‘root’ part for now: it will be explained later. The actual output can be formatted quite flexibly if you need that; formatting options will also be explained later.</p> </section> <section id="logging-to-a-file"> <h3>Logging to a file</h3> <p>A very common situation is that of recording logging events in a file, so let’s look at that next. Be sure to try the following in a newly started Python interpreter, and don’t just continue from the session described above:</p> <pre data-language="python">import logging
logging.basicConfig(filename='example.log', encoding='utf-8', level=logging.DEBUG)
logging.debug('This message should go to the log file')
logging.info('So should this')
logging.warning('And this, too')
logging.error('And non-ASCII stuff, too, like Øresund and Malmö')
</pre> <div class="versionchanged"> <p><span class="versionmodified changed">Changed in version 3.9: </span>The <em>encoding</em> argument was added. In earlier Python versions, or if not specified, the encoding used is the default value used by <a class="reference internal" href="../library/functions#open" title="open"><code>open()</code></a>. While not shown in the above example, an <em>errors</em> argument can also now be passed, which determines how encoding errors are handled. For available values and the default, see the documentation for <a class="reference internal" href="../library/functions#open" title="open"><code>open()</code></a>.</p> </div> <p>And now if we open the file and look at what we have, we should find the log messages:</p> <pre data-language="none">DEBUG:root:This message should go to the log file
INFO:root:So should this
WARNING:root:And this, too
ERROR:root:And non-ASCII stuff, too, like Øresund and Malmö
</pre> <p>This example also shows how you can set the logging level which acts as the threshold for tracking. In this case, because we set the threshold to <code>DEBUG</code>, all of the messages were printed.</p> <p>If you want to set the logging level from a command-line option such as:</p> <pre data-language="none">--log=INFO
</pre> <p>and you have the value of the parameter passed for <code>--log</code> in some variable <em>loglevel</em>, you can use:</p> <pre data-language="python">getattr(logging, loglevel.upper())
</pre> <p>to get the value which you’ll pass to <a class="reference internal" href="../library/logging#logging.basicConfig" title="logging.basicConfig"><code>basicConfig()</code></a> via the <em>level</em> argument. You may want to error check any user input value, perhaps as in the following example:</p> <pre data-language="python"># assuming loglevel is bound to the string value obtained from the
# command line argument. Convert to upper case to allow the user to
# specify --log=DEBUG or --log=debug
numeric_level = getattr(logging, loglevel.upper(), None)
if not isinstance(numeric_level, int):
raise ValueError('Invalid log level: %s' % loglevel)
logging.basicConfig(level=numeric_level, ...)
</pre> <p>The call to <a class="reference internal" href="../library/logging#logging.basicConfig" title="logging.basicConfig"><code>basicConfig()</code></a> should come <em>before</em> any calls to <a class="reference internal" href="../library/logging#logging.debug" title="logging.debug"><code>debug()</code></a>, <a class="reference internal" href="../library/logging#logging.info" title="logging.info"><code>info()</code></a>, etc. Otherwise, those functions will call <a class="reference internal" href="../library/logging#logging.basicConfig" title="logging.basicConfig"><code>basicConfig()</code></a> for you with the default options. As it’s intended as a one-off simple configuration facility, only the first call will actually do anything: subsequent calls are effectively no-ops.</p> <p>If you run the above script several times, the messages from successive runs are appended to the file <em>example.log</em>. If you want each run to start afresh, not remembering the messages from earlier runs, you can specify the <em>filemode</em> argument, by changing the call in the above example to:</p> <pre data-language="python">logging.basicConfig(filename='example.log', filemode='w', level=logging.DEBUG)
</pre> <p>The output will be the same as before, but the log file is no longer appended to, so the messages from earlier runs are lost.</p> </section> <section id="logging-from-multiple-modules"> <h3>Logging from multiple modules</h3> <p>If your program consists of multiple modules, here’s an example of how you could organize logging in it:</p> <pre data-language="python"># myapp.py
import logging
import mylib
def main():
logging.basicConfig(filename='myapp.log', level=logging.INFO)
logging.info('Started')
mylib.do_something()
logging.info('Finished')
if __name__ == '__main__':
main()
</pre> <pre data-language="python"># mylib.py
import logging
def do_something():
logging.info('Doing something')
</pre> <p>If you run <em>myapp.py</em>, you should see this in <em>myapp.log</em>:</p> <pre data-language="none">INFO:root:Started
INFO:root:Doing something
INFO:root:Finished
</pre> <p>which is hopefully what you were expecting to see. You can generalize this to multiple modules, using the pattern in <em>mylib.py</em>. Note that for this simple usage pattern, you won’t know, by looking in the log file, <em>where</em> in your application your messages came from, apart from looking at the event description. If you want to track the location of your messages, you’ll need to refer to the documentation beyond the tutorial level – see <a class="reference internal" href="#logging-advanced-tutorial"><span class="std std-ref">Advanced Logging Tutorial</span></a>.</p> </section> <section id="logging-variable-data"> <h3>Logging variable data</h3> <p>To log variable data, use a format string for the event description message and append the variable data as arguments. For example:</p> <pre data-language="python">import logging
logging.warning('%s before you %s', 'Look', 'leap!')
</pre> <p>will display:</p> <pre data-language="none">WARNING:root:Look before you leap!
</pre> <p>As you can see, merging of variable data into the event description message uses the old, %-style of string formatting. This is for backwards compatibility: the logging package pre-dates newer formatting options such as <a class="reference internal" href="../library/stdtypes#str.format" title="str.format"><code>str.format()</code></a> and <a class="reference internal" href="../library/string#string.Template" title="string.Template"><code>string.Template</code></a>. These newer formatting options <em>are</em> supported, but exploring them is outside the scope of this tutorial: see <a class="reference internal" href="logging-cookbook#formatting-styles"><span class="std std-ref">Using particular formatting styles throughout your application</span></a> for more information.</p> </section> <section id="changing-the-format-of-displayed-messages"> <h3>Changing the format of displayed messages</h3> <p>To change the format which is used to display messages, you need to specify the format you want to use:</p> <pre data-language="python">import logging
logging.basicConfig(format='%(levelname)s:%(message)s', level=logging.DEBUG)
logging.debug('This message should appear on the console')
logging.info('So should this')
logging.warning('And this, too')
</pre> <p>which would print:</p> <pre data-language="none">DEBUG:This message should appear on the console
INFO:So should this
WARNING:And this, too
</pre> <p>Notice that the ‘root’ which appeared in earlier examples has disappeared. For a full set of things that can appear in format strings, you can refer to the documentation for <a class="reference internal" href="../library/logging#logrecord-attributes"><span class="std std-ref">LogRecord attributes</span></a>, but for simple usage, you just need the <em>levelname</em> (severity), <em>message</em> (event description, including variable data) and perhaps to display when the event occurred. This is described in the next section.</p> </section> <section id="displaying-the-date-time-in-messages"> <h3>Displaying the date/time in messages</h3> <p>To display the date and time of an event, you would place ‘%(asctime)s’ in your format string:</p> <pre data-language="python">import logging
logging.basicConfig(format='%(asctime)s %(message)s')
logging.warning('is when this event was logged.')
</pre> <p>which should print something like this:</p> <pre data-language="none">2010-12-12 11:41:42,612 is when this event was logged.
</pre> <p>The default format for date/time display (shown above) is like ISO8601 or <span class="target" id="index-0"></span><a class="rfc reference external" href="https://datatracker.ietf.org/doc/html/rfc3339.html"><strong>RFC 3339</strong></a>. If you need more control over the formatting of the date/time, provide a <em>datefmt</em> argument to <code>basicConfig</code>, as in this example:</p> <pre data-language="python">import logging
logging.basicConfig(format='%(asctime)s %(message)s', datefmt='%m/%d/%Y %I:%M:%S %p')
logging.warning('is when this event was logged.')
</pre> <p>which would display something like this:</p> <pre data-language="none">12/12/2010 11:46:36 AM is when this event was logged.
</pre> <p>The format of the <em>datefmt</em> argument is the same as supported by <a class="reference internal" href="../library/time#time.strftime" title="time.strftime"><code>time.strftime()</code></a>.</p> </section> <section id="next-steps"> <h3>Next Steps</h3> <p>That concludes the basic tutorial. It should be enough to get you up and running with logging. There’s a lot more that the logging package offers, but to get the best out of it, you’ll need to invest a little more of your time in reading the following sections. If you’re ready for that, grab some of your favourite beverage and carry on.</p> <p>If your logging needs are simple, then use the above examples to incorporate logging into your own scripts, and if you run into problems or don’t understand something, please post a question on the comp.lang.python Usenet group (available at <a class="reference external" href="https://groups.google.com/g/comp.lang.python">https://groups.google.com/g/comp.lang.python</a>) and you should receive help before too long.</p> <p>Still here? You can carry on reading the next few sections, which provide a slightly more advanced/in-depth tutorial than the basic one above. After that, you can take a look at the <a class="reference internal" href="logging-cookbook#logging-cookbook"><span class="std std-ref">Logging Cookbook</span></a>.</p> </section> </section> <section id="advanced-logging-tutorial"> <span id="logging-advanced-tutorial"></span><h2>Advanced Logging Tutorial</h2> <p>The logging library takes a modular approach and offers several categories of components: loggers, handlers, filters, and formatters.</p> <ul class="simple"> <li>Loggers expose the interface that application code directly uses.</li> <li>Handlers send the log records (created by loggers) to the appropriate destination.</li> <li>Filters provide a finer grained facility for determining which log records to output.</li> <li>Formatters specify the layout of log records in the final output.</li> </ul> <p>Log event information is passed between loggers, handlers, filters and formatters in a <a class="reference internal" href="../library/logging#logging.LogRecord" title="logging.LogRecord"><code>LogRecord</code></a> instance.</p> <p>Logging is performed by calling methods on instances of the <a class="reference internal" href="../library/logging#logging.Logger" title="logging.Logger"><code>Logger</code></a> class (hereafter called <em class="dfn">loggers</em>). Each instance has a name, and they are conceptually arranged in a namespace hierarchy using dots (periods) as separators. For example, a logger named ‘scan’ is the parent of loggers ‘scan.text’, ‘scan.html’ and ‘scan.pdf’. Logger names can be anything you want, and indicate the area of an application in which a logged message originates.</p> <p>A good convention to use when naming loggers is to use a module-level logger, in each module which uses logging, named as follows:</p> <pre data-language="python">logger = logging.getLogger(__name__)
</pre> <p>This means that logger names track the package/module hierarchy, and it’s intuitively obvious where events are logged just from the logger name.</p> <p>The root of the hierarchy of loggers is called the root logger. That’s the logger used by the functions <a class="reference internal" href="../library/logging#logging.debug" title="logging.debug"><code>debug()</code></a>, <a class="reference internal" href="../library/logging#logging.info" title="logging.info"><code>info()</code></a>, <a class="reference internal" href="../library/logging#logging.warning" title="logging.warning"><code>warning()</code></a>, <a class="reference internal" href="../library/logging#logging.error" title="logging.error"><code>error()</code></a> and <a class="reference internal" href="../library/logging#logging.critical" title="logging.critical"><code>critical()</code></a>, which just call the same-named method of the root logger. The functions and the methods have the same signatures. The root logger’s name is printed as ‘root’ in the logged output.</p> <p>It is, of course, possible to log messages to different destinations. Support is included in the package for writing log messages to files, HTTP GET/POST locations, email via SMTP, generic sockets, queues, or OS-specific logging mechanisms such as syslog or the Windows NT event log. Destinations are served by <em class="dfn">handler</em> classes. You can create your own log destination class if you have special requirements not met by any of the built-in handler classes.</p> <p>By default, no destination is set for any logging messages. You can specify a destination (such as console or file) by using <a class="reference internal" href="../library/logging#logging.basicConfig" title="logging.basicConfig"><code>basicConfig()</code></a> as in the tutorial examples. If you call the functions <a class="reference internal" href="../library/logging#logging.debug" title="logging.debug"><code>debug()</code></a>, <a class="reference internal" href="../library/logging#logging.info" title="logging.info"><code>info()</code></a>, <a class="reference internal" href="../library/logging#logging.warning" title="logging.warning"><code>warning()</code></a>, <a class="reference internal" href="../library/logging#logging.error" title="logging.error"><code>error()</code></a> and <a class="reference internal" href="../library/logging#logging.critical" title="logging.critical"><code>critical()</code></a>, they will check to see if no destination is set; and if one is not set, they will set a destination of the console (<code>sys.stderr</code>) and a default format for the displayed message before delegating to the root logger to do the actual message output.</p> <p>The default format set by <a class="reference internal" href="../library/logging#logging.basicConfig" title="logging.basicConfig"><code>basicConfig()</code></a> for messages is:</p> <pre data-language="none">severity:logger name:message
</pre> <p>You can change this by passing a format string to <a class="reference internal" href="../library/logging#logging.basicConfig" title="logging.basicConfig"><code>basicConfig()</code></a> with the <em>format</em> keyword argument. For all options regarding how a format string is constructed, see <a class="reference internal" href="../library/logging#formatter-objects"><span class="std std-ref">Formatter Objects</span></a>.</p> <section id="logging-flow"> <h3>Logging Flow</h3> <p>The flow of log event information in loggers and handlers is illustrated in the following diagram.</p> <img alt="../_images/logging_flow.png" class="invert-in-dark-mode" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAA7sAAAL2CAMAAAC39XH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PN2vTljttMOz0gQkQLLJ+4mhSIPaxB68PyqbJEtMA+E1dDNO+A0cx7YNlUWW6Xifa0/8TVRVNliehgiboun6g8VZYtPKKDOi+/k81TZYnosC5+u71BOXmqLLfLRAV8fP/uNeaxpEtUnbfr1QXmsaRLVJuL1fotZrGkS1Sf1+/ef8QMlnSJanRzO9fMY0mXqEoXL9fnuO9Ihi8T0dX1d9XaI/mjB0QENOsHq70s6RJV7fSh31JZ0iWq29Wnu8tKp7gT0Uy1d/mp7MWKJV2ip/Ph1SkWlnRX3C4TPaGTs9vLJU9Gs6RL9NRe3O1a7T3hTBuiKpzv1ro9Z0mXqICi0y7ybZrbZaICyk6ZOjljSZeomFLTHfPX0kRUl/mpypd3LOkSVWX+Qan8GBa3y0SV+skDyqcs6RJV7KFiULM+43aZqGpX/zET5+qaJV2i+t3kQRj378XnIKIj8N1MnJtblnSJjsXV9d2Lr989c7tMdEQub89OWNIlOkanrz6wpEt0jE5+ZUmXnpF/AB/wDma3h1YQAAAAAElFTkSuQmCC"> </section> <section id="loggers"> <h3>Loggers</h3> <p><a class="reference internal" href="../library/logging#logging.Logger" title="logging.Logger"><code>Logger</code></a> objects have a threefold job. First, they expose several methods to application code so that applications can log messages at runtime. Second, logger objects determine which log messages to act upon based upon severity (the default filtering facility) or filter objects. Third, logger objects pass along relevant log messages to all interested log handlers.</p> <p>The most widely used methods on logger objects fall into two categories: configuration and message sending.</p> <p>These are the most common configuration methods:</p> <ul class="simple"> <li>
<a class="reference internal" href="../library/logging#logging.Logger.setLevel" title="logging.Logger.setLevel"><code>Logger.setLevel()</code></a> specifies the lowest-severity log message a logger will handle, where debug is the lowest built-in severity level and critical is the highest built-in severity. For example, if the severity level is INFO, the logger will handle only INFO, WARNING, ERROR, and CRITICAL messages and will ignore DEBUG messages.</li> <li>
<a class="reference internal" href="../library/logging#logging.Logger.addHandler" title="logging.Logger.addHandler"><code>Logger.addHandler()</code></a> and <a class="reference internal" href="../library/logging#logging.Logger.removeHandler" title="logging.Logger.removeHandler"><code>Logger.removeHandler()</code></a> add and remove handler objects from the logger object. Handlers are covered in more detail in <a class="reference internal" href="#handler-basic"><span class="std std-ref">Handlers</span></a>.</li> <li>
<a class="reference internal" href="../library/logging#logging.Logger.addFilter" title="logging.Logger.addFilter"><code>Logger.addFilter()</code></a> and <a class="reference internal" href="../library/logging#logging.Logger.removeFilter" title="logging.Logger.removeFilter"><code>Logger.removeFilter()</code></a> add and remove filter objects from the logger object. Filters are covered in more detail in <a class="reference internal" href="../library/logging#filter"><span class="std std-ref">Filter Objects</span></a>.</li> </ul> <p>You don’t need to always call these methods on every logger you create. See the last two paragraphs in this section.</p> <p>With the logger object configured, the following methods create log messages:</p> <ul class="simple"> <li>
<a class="reference internal" href="../library/logging#logging.Logger.debug" title="logging.Logger.debug"><code>Logger.debug()</code></a>, <a class="reference internal" href="../library/logging#logging.Logger.info" title="logging.Logger.info"><code>Logger.info()</code></a>, <a class="reference internal" href="../library/logging#logging.Logger.warning" title="logging.Logger.warning"><code>Logger.warning()</code></a>, <a class="reference internal" href="../library/logging#logging.Logger.error" title="logging.Logger.error"><code>Logger.error()</code></a>, and <a class="reference internal" href="../library/logging#logging.Logger.critical" title="logging.Logger.critical"><code>Logger.critical()</code></a> all create log records with a message and a level that corresponds to their respective method names. The message is actually a format string, which may contain the standard string substitution syntax of <code>%s</code>, <code>%d</code>, <code>%f</code>, and so on. The rest of their arguments is a list of objects that correspond with the substitution fields in the message. With regard to <code>**kwargs</code>, the logging methods care only about a keyword of <code>exc_info</code> and use it to determine whether to log exception information.</li> <li>
<a class="reference internal" href="../library/logging#logging.Logger.exception" title="logging.Logger.exception"><code>Logger.exception()</code></a> creates a log message similar to <a class="reference internal" href="../library/logging#logging.Logger.error" title="logging.Logger.error"><code>Logger.error()</code></a>. The difference is that <a class="reference internal" href="../library/logging#logging.Logger.exception" title="logging.Logger.exception"><code>Logger.exception()</code></a> dumps a stack trace along with it. Call this method only from an exception handler.</li> <li>
<a class="reference internal" href="../library/logging#logging.Logger.log" title="logging.Logger.log"><code>Logger.log()</code></a> takes a log level as an explicit argument. This is a little more verbose for logging messages than using the log level convenience methods listed above, but this is how to log at custom log levels.</li> </ul> <p><a class="reference internal" href="../library/logging#logging.getLogger" title="logging.getLogger"><code>getLogger()</code></a> returns a reference to a logger instance with the specified name if it is provided, or <code>root</code> if not. The names are period-separated hierarchical structures. Multiple calls to <a class="reference internal" href="../library/logging#logging.getLogger" title="logging.getLogger"><code>getLogger()</code></a> with the same name will return a reference to the same logger object. Loggers that are further down in the hierarchical list are children of loggers higher up in the list. For example, given a logger with a name of <code>foo</code>, loggers with names of <code>foo.bar</code>, <code>foo.bar.baz</code>, and <code>foo.bam</code> are all descendants of <code>foo</code>.</p> <p>Loggers have a concept of <em>effective level</em>. If a level is not explicitly set on a logger, the level of its parent is used instead as its effective level. If the parent has no explicit level set, <em>its</em> parent is examined, and so on - all ancestors are searched until an explicitly set level is found. The root logger always has an explicit level set (<code>WARNING</code> by default). When deciding whether to process an event, the effective level of the logger is used to determine whether the event is passed to the logger’s handlers.</p> <p>Child loggers propagate messages up to the handlers associated with their ancestor loggers. Because of this, it is unnecessary to define and configure handlers for all the loggers an application uses. It is sufficient to configure handlers for a top-level logger and create child loggers as needed. (You can, however, turn off propagation by setting the <em>propagate</em> attribute of a logger to <code>False</code>.)</p> </section> <section id="handlers"> <span id="handler-basic"></span><h3>Handlers</h3> <p><a class="reference internal" href="../library/logging#logging.Handler" title="logging.Handler"><code>Handler</code></a> objects are responsible for dispatching the appropriate log messages (based on the log messages’ severity) to the handler’s specified destination. <a class="reference internal" href="../library/logging#logging.Logger" title="logging.Logger"><code>Logger</code></a> objects can add zero or more handler objects to themselves with an <a class="reference internal" href="../library/logging#logging.Logger.addHandler" title="logging.Logger.addHandler"><code>addHandler()</code></a> method. As an example scenario, an application may want to send all log messages to a log file, all log messages of error or higher to stdout, and all messages of critical to an email address. This scenario requires three individual handlers where each handler is responsible for sending messages of a specific severity to a specific location.</p> <p>The standard library includes quite a few handler types (see <a class="reference internal" href="#useful-handlers"><span class="std std-ref">Useful Handlers</span></a>); the tutorials use mainly <a class="reference internal" href="../library/logging.handlers#logging.StreamHandler" title="logging.StreamHandler"><code>StreamHandler</code></a> and <a class="reference internal" href="../library/logging.handlers#logging.FileHandler" title="logging.FileHandler"><code>FileHandler</code></a> in its examples.</p> <p>There are very few methods in a handler for application developers to concern themselves with. The only handler methods that seem relevant for application developers who are using the built-in handler objects (that is, not creating custom handlers) are the following configuration methods:</p> <ul class="simple"> <li>The <a class="reference internal" href="../library/logging#logging.Handler.setLevel" title="logging.Handler.setLevel"><code>setLevel()</code></a> method, just as in logger objects, specifies the lowest severity that will be dispatched to the appropriate destination. Why are there two <code>setLevel()</code> methods? The level set in the logger determines which severity of messages it will pass to its handlers. The level set in each handler determines which messages that handler will send on.</li> <li>
<a class="reference internal" href="../library/logging#logging.Handler.setFormatter" title="logging.Handler.setFormatter"><code>setFormatter()</code></a> selects a Formatter object for this handler to use.</li> <li>
<a class="reference internal" href="../library/logging#logging.Handler.addFilter" title="logging.Handler.addFilter"><code>addFilter()</code></a> and <a class="reference internal" href="../library/logging#logging.Handler.removeFilter" title="logging.Handler.removeFilter"><code>removeFilter()</code></a> respectively configure and deconfigure filter objects on handlers.</li> </ul> <p>Application code should not directly instantiate and use instances of <a class="reference internal" href="../library/logging#logging.Handler" title="logging.Handler"><code>Handler</code></a>. Instead, the <a class="reference internal" href="../library/logging#logging.Handler" title="logging.Handler"><code>Handler</code></a> class is a base class that defines the interface that all handlers should have and establishes some default behavior that child classes can use (or override).</p> </section> <section id="formatters"> <h3>Formatters</h3> <p>Formatter objects configure the final order, structure, and contents of the log message. Unlike the base <a class="reference internal" href="../library/logging#logging.Handler" title="logging.Handler"><code>logging.Handler</code></a> class, application code may instantiate formatter classes, although you could likely subclass the formatter if your application needs special behavior. The constructor takes three optional arguments – a message format string, a date format string and a style indicator.</p> <dl class="py method"> <dt class="sig sig-object py" id="logging.logging.Formatter.__init__">
<code>logging.Formatter.__init__(fmt=None, datefmt=None, style='%')</code> </dt> <dd></dd>
</dl> <p>If there is no message format string, the default is to use the raw message. If there is no date format string, the default date format is:</p> <pre data-language="none">%Y-%m-%d %H:%M:%S
</pre> <p>with the milliseconds tacked on at the end. The <code>style</code> is one of <code>'%'</code>, <code>'{'</code>, or <code>'$'</code>. If one of these is not specified, then <code>'%'</code> will be used.</p> <p>If the <code>style</code> is <code>'%'</code>, the message format string uses <code>%(<dictionary key>)s</code> styled string substitution; the possible keys are documented in <a class="reference internal" href="../library/logging#logrecord-attributes"><span class="std std-ref">LogRecord attributes</span></a>. If the style is <code>'{'</code>, the message format string is assumed to be compatible with <a class="reference internal" href="../library/stdtypes#str.format" title="str.format"><code>str.format()</code></a> (using keyword arguments), while if the style is <code>'$'</code> then the message format string should conform to what is expected by <a class="reference internal" href="../library/string#string.Template.substitute" title="string.Template.substitute"><code>string.Template.substitute()</code></a>.</p> <div class="versionchanged"> <p><span class="versionmodified changed">Changed in version 3.2: </span>Added the <code>style</code> parameter.</p> </div> <p>The following message format string will log the time in a human-readable format, the severity of the message, and the contents of the message, in that order:</p> <pre data-language="python">'%(asctime)s - %(levelname)s - %(message)s'
</pre> <p>Formatters use a user-configurable function to convert the creation time of a record to a tuple. By default, <a class="reference internal" href="../library/time#time.localtime" title="time.localtime"><code>time.localtime()</code></a> is used; to change this for a particular formatter instance, set the <code>converter</code> attribute of the instance to a function with the same signature as <a class="reference internal" href="../library/time#time.localtime" title="time.localtime"><code>time.localtime()</code></a> or <a class="reference internal" href="../library/time#time.gmtime" title="time.gmtime"><code>time.gmtime()</code></a>. To change it for all formatters, for example if you want all logging times to be shown in GMT, set the <code>converter</code> attribute in the Formatter class (to <code>time.gmtime</code> for GMT display).</p> </section> <section id="configuring-logging"> <h3>Configuring Logging</h3> <p>Programmers can configure logging in three ways:</p> <ol class="arabic simple"> <li>Creating loggers, handlers, and formatters explicitly using Python code that calls the configuration methods listed above.</li> <li>Creating a logging config file and reading it using the <a class="reference internal" href="../library/logging.config#logging.config.fileConfig" title="logging.config.fileConfig"><code>fileConfig()</code></a> function.</li> <li>Creating a dictionary of configuration information and passing it to the <a class="reference internal" href="../library/logging.config#logging.config.dictConfig" title="logging.config.dictConfig"><code>dictConfig()</code></a> function.</li> </ol> <p>For the reference documentation on the last two options, see <a class="reference internal" href="../library/logging.config#logging-config-api"><span class="std std-ref">Configuration functions</span></a>. The following example configures a very simple logger, a console handler, and a simple formatter using Python code:</p> <pre data-language="python">import logging
# create logger
logger = logging.getLogger('simple_example')
logger.setLevel(logging.DEBUG)
# create console handler and set level to debug
ch = logging.StreamHandler()
ch.setLevel(logging.DEBUG)
# create formatter
formatter = logging.Formatter('%(asctime)s - %(name)s - %(levelname)s - %(message)s')
# add formatter to ch
ch.setFormatter(formatter)
# add ch to logger
logger.addHandler(ch)
# 'application' code
logger.debug('debug message')
logger.info('info message')
logger.warning('warn message')
logger.error('error message')
logger.critical('critical message')
</pre> <p>Running this module from the command line produces the following output:</p> <pre data-language="shell">$ python simple_logging_module.py
2005-03-19 15:10:26,618 - simple_example - DEBUG - debug message
2005-03-19 15:10:26,620 - simple_example - INFO - info message
2005-03-19 15:10:26,695 - simple_example - WARNING - warn message
2005-03-19 15:10:26,697 - simple_example - ERROR - error message
2005-03-19 15:10:26,773 - simple_example - CRITICAL - critical message
</pre> <p>The following Python module creates a logger, handler, and formatter nearly identical to those in the example listed above, with the only difference being the names of the objects:</p> <pre data-language="python">import logging
import logging.config
logging.config.fileConfig('logging.conf')
# create logger
logger = logging.getLogger('simpleExample')
# 'application' code
logger.debug('debug message')
logger.info('info message')
logger.warning('warn message')
logger.error('error message')
logger.critical('critical message')
</pre> <p>Here is the logging.conf file:</p> <pre data-language="ini">[loggers]
keys=root,simpleExample
[handlers]
keys=consoleHandler
[formatters]
keys=simpleFormatter
[logger_root]
level=DEBUG
handlers=consoleHandler
[logger_simpleExample]
level=DEBUG
handlers=consoleHandler
qualname=simpleExample
propagate=0
[handler_consoleHandler]
class=StreamHandler
level=DEBUG
formatter=simpleFormatter
args=(sys.stdout,)
[formatter_simpleFormatter]
format=%(asctime)s - %(name)s - %(levelname)s - %(message)s
</pre> <p>The output is nearly identical to that of the non-config-file-based example:</p> <pre data-language="shell">$ python simple_logging_config.py
2005-03-19 15:38:55,977 - simpleExample - DEBUG - debug message
2005-03-19 15:38:55,979 - simpleExample - INFO - info message
2005-03-19 15:38:56,054 - simpleExample - WARNING - warn message
2005-03-19 15:38:56,055 - simpleExample - ERROR - error message
2005-03-19 15:38:56,130 - simpleExample - CRITICAL - critical message
</pre> <p>You can see that the config file approach has a few advantages over the Python code approach, mainly separation of configuration and code and the ability of noncoders to easily modify the logging properties.</p> <div class="admonition warning"> <p class="admonition-title">Warning</p> <p>The <a class="reference internal" href="../library/logging.config#logging.config.fileConfig" title="logging.config.fileConfig"><code>fileConfig()</code></a> function takes a default parameter, <code>disable_existing_loggers</code>, which defaults to <code>True</code> for reasons of backward compatibility. This may or may not be what you want, since it will cause any non-root loggers existing before the <a class="reference internal" href="../library/logging.config#logging.config.fileConfig" title="logging.config.fileConfig"><code>fileConfig()</code></a> call to be disabled unless they (or an ancestor) are explicitly named in the configuration. Please refer to the reference documentation for more information, and specify <code>False</code> for this parameter if you wish.</p> <p>The dictionary passed to <a class="reference internal" href="../library/logging.config#logging.config.dictConfig" title="logging.config.dictConfig"><code>dictConfig()</code></a> can also specify a Boolean value with key <code>disable_existing_loggers</code>, which if not specified explicitly in the dictionary also defaults to being interpreted as <code>True</code>. This leads to the logger-disabling behaviour described above, which may not be what you want - in which case, provide the key explicitly with a value of <code>False</code>.</p> </div> <p>Note that the class names referenced in config files need to be either relative to the logging module, or absolute values which can be resolved using normal import mechanisms. Thus, you could use either <a class="reference internal" href="../library/logging.handlers#logging.handlers.WatchedFileHandler" title="logging.handlers.WatchedFileHandler"><code>WatchedFileHandler</code></a> (relative to the logging module) or <code>mypackage.mymodule.MyHandler</code> (for a class defined in package <code>mypackage</code> and module <code>mymodule</code>, where <code>mypackage</code> is available on the Python import path).</p> <p>In Python 3.2, a new means of configuring logging has been introduced, using dictionaries to hold configuration information. This provides a superset of the functionality of the config-file-based approach outlined above, and is the recommended configuration method for new applications and deployments. Because a Python dictionary is used to hold configuration information, and since you can populate that dictionary using different means, you have more options for configuration. For example, you can use a configuration file in JSON format, or, if you have access to YAML processing functionality, a file in YAML format, to populate the configuration dictionary. Or, of course, you can construct the dictionary in Python code, receive it in pickled form over a socket, or use whatever approach makes sense for your application.</p> <p>Here’s an example of the same configuration as above, in YAML format for the new dictionary-based approach:</p> <pre data-language="yaml">version: 1
formatters:
simple:
format: '%(asctime)s - %(name)s - %(levelname)s - %(message)s'
handlers:
console:
class: logging.StreamHandler
level: DEBUG
formatter: simple
stream: ext://sys.stdout
loggers:
simpleExample:
level: DEBUG
handlers: [console]
propagate: no
root:
level: DEBUG
handlers: [console]
</pre> <p>For more information about logging using a dictionary, see <a class="reference internal" href="../library/logging.config#logging-config-api"><span class="std std-ref">Configuration functions</span></a>.</p> </section> <section id="what-happens-if-no-configuration-is-provided"> <h3>What happens if no configuration is provided</h3> <p>If no logging configuration is provided, it is possible to have a situation where a logging event needs to be output, but no handlers can be found to output the event. The behaviour of the logging package in these circumstances is dependent on the Python version.</p> <p>For versions of Python prior to 3.2, the behaviour is as follows:</p> <ul class="simple"> <li>If <em>logging.raiseExceptions</em> is <code>False</code> (production mode), the event is silently dropped.</li> <li>If <em>logging.raiseExceptions</em> is <code>True</code> (development mode), a message ‘No handlers could be found for logger X.Y.Z’ is printed once.</li> </ul> <p>In Python 3.2 and later, the behaviour is as follows:</p> <ul class="simple"> <li>The event is output using a ‘handler of last resort’, stored in <code>logging.lastResort</code>. This internal handler is not associated with any logger, and acts like a <a class="reference internal" href="../library/logging.handlers#logging.StreamHandler" title="logging.StreamHandler"><code>StreamHandler</code></a> which writes the event description message to the current value of <code>sys.stderr</code> (therefore respecting any redirections which may be in effect). No formatting is done on the message - just the bare event description message is printed. The handler’s level is set to <code>WARNING</code>, so all events at this and greater severities will be output.</li> </ul> <p>To obtain the pre-3.2 behaviour, <code>logging.lastResort</code> can be set to <code>None</code>.</p> </section> <section id="configuring-logging-for-a-library"> <span id="library-config"></span><h3>Configuring Logging for a Library</h3> <p>When developing a library which uses logging, you should take care to document how the library uses logging - for example, the names of loggers used. Some consideration also needs to be given to its logging configuration. If the using application does not use logging, and library code makes logging calls, then (as described in the previous section) events of severity <code>WARNING</code> and greater will be printed to <code>sys.stderr</code>. This is regarded as the best default behaviour.</p> <p>If for some reason you <em>don’t</em> want these messages printed in the absence of any logging configuration, you can attach a do-nothing handler to the top-level logger for your library. This avoids the message being printed, since a handler will always be found for the library’s events: it just doesn’t produce any output. If the library user configures logging for application use, presumably that configuration will add some handlers, and if levels are suitably configured then logging calls made in library code will send output to those handlers, as normal.</p> <p>A do-nothing handler is included in the logging package: <a class="reference internal" href="../library/logging.handlers#logging.NullHandler" title="logging.NullHandler"><code>NullHandler</code></a> (since Python 3.1). An instance of this handler could be added to the top-level logger of the logging namespace used by the library (<em>if</em> you want to prevent your library’s logged events being output to <code>sys.stderr</code> in the absence of logging configuration). If all logging by a library <em>foo</em> is done using loggers with names matching ‘foo.x’, ‘foo.x.y’, etc. then the code:</p> <pre data-language="python">import logging
logging.getLogger('foo').addHandler(logging.NullHandler())
</pre> <p>should have the desired effect. If an organisation produces a number of libraries, then the logger name specified can be ‘orgname.foo’ rather than just ‘foo’.</p> <div class="admonition note"> <p class="admonition-title">Note</p> <p>It is strongly advised that you <em>do not log to the root logger</em> in your library. Instead, use a logger with a unique and easily identifiable name, such as the <code>__name__</code> for your library’s top-level package or module. Logging to the root logger will make it difficult or impossible for the application developer to configure the logging verbosity or handlers of your library as they wish.</p> </div> <div class="admonition note"> <p class="admonition-title">Note</p> <p>It is strongly advised that you <em>do not add any handlers other than</em> <a class="reference internal" href="../library/logging.handlers#logging.NullHandler" title="logging.NullHandler"><code>NullHandler</code></a> <em>to your library’s loggers</em>. This is because the configuration of handlers is the prerogative of the application developer who uses your library. The application developer knows their target audience and what handlers are most appropriate for their application: if you add handlers ‘under the hood’, you might well interfere with their ability to carry out unit tests and deliver logs which suit their requirements.</p> </div> </section> </section> <section id="logging-levels"> <h2>Logging Levels</h2> <p>The numeric values of logging levels are given in the following table. These are primarily of interest if you want to define your own levels, and need them to have specific values relative to the predefined levels. If you define a level with the same numeric value, it overwrites the predefined value; the predefined name is lost.</p> <table class="docutils align-default"> <thead> <tr>
<th class="head"><p>Level</p></th> <th class="head"><p>Numeric value</p></th> </tr> </thead> <tr>
<td><p><code>CRITICAL</code></p></td> <td><p>50</p></td> </tr> <tr>
<td><p><code>ERROR</code></p></td> <td><p>40</p></td> </tr> <tr>
<td><p><code>WARNING</code></p></td> <td><p>30</p></td> </tr> <tr>
<td><p><code>INFO</code></p></td> <td><p>20</p></td> </tr> <tr>
<td><p><code>DEBUG</code></p></td> <td><p>10</p></td> </tr> <tr>
<td><p><code>NOTSET</code></p></td> <td><p>0</p></td> </tr> </table> <p>Levels can also be associated with loggers, being set either by the developer or through loading a saved logging configuration. When a logging method is called on a logger, the logger compares its own level with the level associated with the method call. If the logger’s level is higher than the method call’s, no logging message is actually generated. This is the basic mechanism controlling the verbosity of logging output.</p> <p>Logging messages are encoded as instances of the <a class="reference internal" href="../library/logging#logging.LogRecord" title="logging.LogRecord"><code>LogRecord</code></a> class. When a logger decides to actually log an event, a <a class="reference internal" href="../library/logging#logging.LogRecord" title="logging.LogRecord"><code>LogRecord</code></a> instance is created from the logging message.</p> <p>Logging messages are subjected to a dispatch mechanism through the use of <em class="dfn">handlers</em>, which are instances of subclasses of the <a class="reference internal" href="../library/logging#logging.Handler" title="logging.Handler"><code>Handler</code></a> class. Handlers are responsible for ensuring that a logged message (in the form of a <a class="reference internal" href="../library/logging#logging.LogRecord" title="logging.LogRecord"><code>LogRecord</code></a>) ends up in a particular location (or set of locations) which is useful for the target audience for that message (such as end users, support desk staff, system administrators, developers). Handlers are passed <a class="reference internal" href="../library/logging#logging.LogRecord" title="logging.LogRecord"><code>LogRecord</code></a> instances intended for particular destinations. Each logger can have zero, one or more handlers associated with it (via the <a class="reference internal" href="../library/logging#logging.Logger.addHandler" title="logging.Logger.addHandler"><code>addHandler()</code></a> method of <a class="reference internal" href="../library/logging#logging.Logger" title="logging.Logger"><code>Logger</code></a>). In addition to any handlers directly associated with a logger, <em>all handlers associated with all ancestors of the logger</em> are called to dispatch the message (unless the <em>propagate</em> flag for a logger is set to a false value, at which point the passing to ancestor handlers stops).</p> <p>Just as for loggers, handlers can have levels associated with them. A handler’s level acts as a filter in the same way as a logger’s level does. If a handler decides to actually dispatch an event, the <a class="reference internal" href="../library/logging#logging.Handler.emit" title="logging.Handler.emit"><code>emit()</code></a> method is used to send the message to its destination. Most user-defined subclasses of <a class="reference internal" href="../library/logging#logging.Handler" title="logging.Handler"><code>Handler</code></a> will need to override this <a class="reference internal" href="../library/logging#logging.Handler.emit" title="logging.Handler.emit"><code>emit()</code></a>.</p> <section id="custom-levels"> <span id="id1"></span><h3>Custom Levels</h3> <p>Defining your own levels is possible, but should not be necessary, as the existing levels have been chosen on the basis of practical experience. However, if you are convinced that you need custom levels, great care should be exercised when doing this, and it is possibly <em>a very bad idea to define custom levels if you are developing a library</em>. That’s because if multiple library authors all define their own custom levels, there is a chance that the logging output from such multiple libraries used together will be difficult for the using developer to control and/or interpret, because a given numeric value might mean different things for different libraries.</p> </section> </section> <section id="useful-handlers"> <span id="id2"></span><h2>Useful Handlers</h2> <p>In addition to the base <a class="reference internal" href="../library/logging#logging.Handler" title="logging.Handler"><code>Handler</code></a> class, many useful subclasses are provided:</p> <ol class="arabic simple"> <li>
<a class="reference internal" href="../library/logging.handlers#logging.StreamHandler" title="logging.StreamHandler"><code>StreamHandler</code></a> instances send messages to streams (file-like objects).</li> <li>
<a class="reference internal" href="../library/logging.handlers#logging.FileHandler" title="logging.FileHandler"><code>FileHandler</code></a> instances send messages to disk files.</li> <li>
<a class="reference internal" href="../library/logging.handlers#logging.handlers.BaseRotatingHandler" title="logging.handlers.BaseRotatingHandler"><code>BaseRotatingHandler</code></a> is the base class for handlers that rotate log files at a certain point. It is not meant to be instantiated directly. Instead, use <a class="reference internal" href="../library/logging.handlers#logging.handlers.RotatingFileHandler" title="logging.handlers.RotatingFileHandler"><code>RotatingFileHandler</code></a> or <a class="reference internal" href="../library/logging.handlers#logging.handlers.TimedRotatingFileHandler" title="logging.handlers.TimedRotatingFileHandler"><code>TimedRotatingFileHandler</code></a>.</li> <li>
<a class="reference internal" href="../library/logging.handlers#logging.handlers.RotatingFileHandler" title="logging.handlers.RotatingFileHandler"><code>RotatingFileHandler</code></a> instances send messages to disk files, with support for maximum log file sizes and log file rotation.</li> <li>
<a class="reference internal" href="../library/logging.handlers#logging.handlers.TimedRotatingFileHandler" title="logging.handlers.TimedRotatingFileHandler"><code>TimedRotatingFileHandler</code></a> instances send messages to disk files, rotating the log file at certain timed intervals.</li> <li>
<a class="reference internal" href="../library/logging.handlers#logging.handlers.SocketHandler" title="logging.handlers.SocketHandler"><code>SocketHandler</code></a> instances send messages to TCP/IP sockets. Since 3.4, Unix domain sockets are also supported.</li> <li>
<a class="reference internal" href="../library/logging.handlers#logging.handlers.DatagramHandler" title="logging.handlers.DatagramHandler"><code>DatagramHandler</code></a> instances send messages to UDP sockets. Since 3.4, Unix domain sockets are also supported.</li> <li>
<a class="reference internal" href="../library/logging.handlers#logging.handlers.SMTPHandler" title="logging.handlers.SMTPHandler"><code>SMTPHandler</code></a> instances send messages to a designated email address.</li> <li>
<a class="reference internal" href="../library/logging.handlers#logging.handlers.SysLogHandler" title="logging.handlers.SysLogHandler"><code>SysLogHandler</code></a> instances send messages to a Unix syslog daemon, possibly on a remote machine.</li> <li>
<a class="reference internal" href="../library/logging.handlers#logging.handlers.NTEventLogHandler" title="logging.handlers.NTEventLogHandler"><code>NTEventLogHandler</code></a> instances send messages to a Windows NT/2000/XP event log.</li> <li>
<a class="reference internal" href="../library/logging.handlers#logging.handlers.MemoryHandler" title="logging.handlers.MemoryHandler"><code>MemoryHandler</code></a> instances send messages to a buffer in memory, which is flushed whenever specific criteria are met.</li> <li>
<a class="reference internal" href="../library/logging.handlers#logging.handlers.HTTPHandler" title="logging.handlers.HTTPHandler"><code>HTTPHandler</code></a> instances send messages to an HTTP server using either <code>GET</code> or <code>POST</code> semantics.</li> <li>
<a class="reference internal" href="../library/logging.handlers#logging.handlers.WatchedFileHandler" title="logging.handlers.WatchedFileHandler"><code>WatchedFileHandler</code></a> instances watch the file they are logging to. If the file changes, it is closed and reopened using the file name. This handler is only useful on Unix-like systems; Windows does not support the underlying mechanism used.</li> <li>
<a class="reference internal" href="../library/logging.handlers#logging.handlers.QueueHandler" title="logging.handlers.QueueHandler"><code>QueueHandler</code></a> instances send messages to a queue, such as those implemented in the <a class="reference internal" href="../library/queue#module-queue" title="queue: A synchronized queue class."><code>queue</code></a> or <a class="reference internal" href="../library/multiprocessing#module-multiprocessing" title="multiprocessing: Process-based parallelism."><code>multiprocessing</code></a> modules.</li> <li>
<a class="reference internal" href="../library/logging.handlers#logging.NullHandler" title="logging.NullHandler"><code>NullHandler</code></a> instances do nothing with error messages. They are used by library developers who want to use logging, but want to avoid the ‘No handlers could be found for logger <em>XXX</em>’ message which can be displayed if the library user has not configured logging. See <a class="reference internal" href="#library-config"><span class="std std-ref">Configuring Logging for a Library</span></a> for more information.</li> </ol> <div class="versionadded"> <p><span class="versionmodified added">New in version 3.1: </span>The <a class="reference internal" href="../library/logging.handlers#logging.NullHandler" title="logging.NullHandler"><code>NullHandler</code></a> class.</p> </div> <div class="versionadded"> <p><span class="versionmodified added">New in version 3.2: </span>The <a class="reference internal" href="../library/logging.handlers#logging.handlers.QueueHandler" title="logging.handlers.QueueHandler"><code>QueueHandler</code></a> class.</p> </div> <p>The <a class="reference internal" href="../library/logging.handlers#logging.NullHandler" title="logging.NullHandler"><code>NullHandler</code></a>, <a class="reference internal" href="../library/logging.handlers#logging.StreamHandler" title="logging.StreamHandler"><code>StreamHandler</code></a> and <a class="reference internal" href="../library/logging.handlers#logging.FileHandler" title="logging.FileHandler"><code>FileHandler</code></a> classes are defined in the core logging package. The other handlers are defined in a sub-module, <a class="reference internal" href="../library/logging.handlers#module-logging.handlers" title="logging.handlers: Handlers for the logging module."><code>logging.handlers</code></a>. (There is also another sub-module, <a class="reference internal" href="../library/logging.config#module-logging.config" title="logging.config: Configuration of the logging module."><code>logging.config</code></a>, for configuration functionality.)</p> <p>Logged messages are formatted for presentation through instances of the <a class="reference internal" href="../library/logging#logging.Formatter" title="logging.Formatter"><code>Formatter</code></a> class. They are initialized with a format string suitable for use with the % operator and a dictionary.</p> <p>For formatting multiple messages in a batch, instances of <code>BufferingFormatter</code> can be used. In addition to the format string (which is applied to each message in the batch), there is provision for header and trailer format strings.</p> <p>When filtering based on logger level and/or handler level is not enough, instances of <a class="reference internal" href="../library/logging#logging.Filter" title="logging.Filter"><code>Filter</code></a> can be added to both <a class="reference internal" href="../library/logging#logging.Logger" title="logging.Logger"><code>Logger</code></a> and <a class="reference internal" href="../library/logging#logging.Handler" title="logging.Handler"><code>Handler</code></a> instances (through their <a class="reference internal" href="../library/logging#logging.Handler.addFilter" title="logging.Handler.addFilter"><code>addFilter()</code></a> method). Before deciding to process a message further, both loggers and handlers consult all their filters for permission. If any filter returns a false value, the message is not processed further.</p> <p>The basic <a class="reference internal" href="../library/logging#logging.Filter" title="logging.Filter"><code>Filter</code></a> functionality allows filtering by specific logger name. If this feature is used, messages sent to the named logger and its children are allowed through the filter, and all others dropped.</p> </section> <section id="exceptions-raised-during-logging"> <span id="logging-exceptions"></span><h2>Exceptions raised during logging</h2> <p>The logging package is designed to swallow exceptions which occur while logging in production. This is so that errors which occur while handling logging events - such as logging misconfiguration, network or other similar errors - do not cause the application using logging to terminate prematurely.</p> <p><a class="reference internal" href="../library/exceptions#SystemExit" title="SystemExit"><code>SystemExit</code></a> and <a class="reference internal" href="../library/exceptions#KeyboardInterrupt" title="KeyboardInterrupt"><code>KeyboardInterrupt</code></a> exceptions are never swallowed. Other exceptions which occur during the <a class="reference internal" href="../library/logging#logging.Handler.emit" title="logging.Handler.emit"><code>emit()</code></a> method of a <a class="reference internal" href="../library/logging#logging.Handler" title="logging.Handler"><code>Handler</code></a> subclass are passed to its <a class="reference internal" href="../library/logging#logging.Handler.handleError" title="logging.Handler.handleError"><code>handleError()</code></a> method.</p> <p>The default implementation of <a class="reference internal" href="../library/logging#logging.Handler.handleError" title="logging.Handler.handleError"><code>handleError()</code></a> in <a class="reference internal" href="../library/logging#logging.Handler" title="logging.Handler"><code>Handler</code></a> checks to see if a module-level variable, <code>raiseExceptions</code>, is set. If set, a traceback is printed to <a class="reference internal" href="../library/sys#sys.stderr" title="sys.stderr"><code>sys.stderr</code></a>. If not set, the exception is swallowed.</p> <div class="admonition note"> <p class="admonition-title">Note</p> <p>The default value of <code>raiseExceptions</code> is <code>True</code>. This is because during development, you typically want to be notified of any exceptions that occur. It’s advised that you set <code>raiseExceptions</code> to <code>False</code> for production usage.</p> </div> </section> <section id="using-arbitrary-objects-as-messages"> <span id="arbitrary-object-messages"></span><h2>Using arbitrary objects as messages</h2> <p>In the preceding sections and examples, it has been assumed that the message passed when logging the event is a string. However, this is not the only possibility. You can pass an arbitrary object as a message, and its <a class="reference internal" href="../reference/datamodel#object.__str__" title="object.__str__"><code>__str__()</code></a> method will be called when the logging system needs to convert it to a string representation. In fact, if you want to, you can avoid computing a string representation altogether - for example, the <a class="reference internal" href="../library/logging.handlers#logging.handlers.SocketHandler" title="logging.handlers.SocketHandler"><code>SocketHandler</code></a> emits an event by pickling it and sending it over the wire.</p> </section> <section id="optimization"> <h2>Optimization</h2> <p>Formatting of message arguments is deferred until it cannot be avoided. However, computing the arguments passed to the logging method can also be expensive, and you may want to avoid doing it if the logger will just throw away your event. To decide what to do, you can call the <a class="reference internal" href="../library/logging#logging.Logger.isEnabledFor" title="logging.Logger.isEnabledFor"><code>isEnabledFor()</code></a> method which takes a level argument and returns true if the event would be created by the Logger for that level of call. You can write code like this:</p> <pre data-language="python">if logger.isEnabledFor(logging.DEBUG):
logger.debug('Message with %s, %s', expensive_func1(),
expensive_func2())
</pre> <p>so that if the logger’s threshold is set above <code>DEBUG</code>, the calls to <code>expensive_func1()</code> and <code>expensive_func2()</code> are never made.</p> <div class="admonition note"> <p class="admonition-title">Note</p> <p>In some cases, <a class="reference internal" href="../library/logging#logging.Logger.isEnabledFor" title="logging.Logger.isEnabledFor"><code>isEnabledFor()</code></a> can itself be more expensive than you’d like (e.g. for deeply nested loggers where an explicit level is only set high up in the logger hierarchy). In such cases (or if you want to avoid calling a method in tight loops), you can cache the result of a call to <a class="reference internal" href="../library/logging#logging.Logger.isEnabledFor" title="logging.Logger.isEnabledFor"><code>isEnabledFor()</code></a> in a local or instance variable, and use that instead of calling the method each time. Such a cached value would only need to be recomputed when the logging configuration changes dynamically while the application is running (which is not all that common).</p> </div> <p>There are other optimizations which can be made for specific applications which need more precise control over what logging information is collected. Here’s a list of things you can do to avoid processing during logging which you don’t need:</p> <table class="docutils align-default"> <thead> <tr>
<th class="head"><p>What you don’t want to collect</p></th> <th class="head"><p>How to avoid collecting it</p></th> </tr> </thead> <tr>
<td><p>Information about where calls were made from.</p></td> <td><p>Set <code>logging._srcfile</code> to <code>None</code>. This avoids calling <a class="reference internal" href="../library/sys#sys._getframe" title="sys._getframe"><code>sys._getframe()</code></a>, which may help to speed up your code in environments like PyPy (which can’t speed up code that uses <a class="reference internal" href="../library/sys#sys._getframe" title="sys._getframe"><code>sys._getframe()</code></a>).</p></td> </tr> <tr>
<td><p>Threading information.</p></td> <td><p>Set <code>logging.logThreads</code> to <code>False</code>.</p></td> </tr> <tr>
<td><p>Current process ID (<a class="reference internal" href="../library/os#os.getpid" title="os.getpid"><code>os.getpid()</code></a>)</p></td> <td><p>Set <code>logging.logProcesses</code> to <code>False</code>.</p></td> </tr> <tr>
<td><p>Current process name when using <code>multiprocessing</code> to manage multiple processes.</p></td> <td><p>Set <code>logging.logMultiprocessing</code> to <code>False</code>.</p></td> </tr> <tr>
<td><p>Current <a class="reference internal" href="../library/asyncio-task#asyncio.Task" title="asyncio.Task"><code>asyncio.Task</code></a> name when using <code>asyncio</code>.</p></td> <td><p>Set <code>logging.logAsyncioTasks</code> to <code>False</code>.</p></td> </tr> </table> <p>Also note that the core logging module only includes the basic handlers. If you don’t import <a class="reference internal" href="../library/logging.handlers#module-logging.handlers" title="logging.handlers: Handlers for the logging module."><code>logging.handlers</code></a> and <a class="reference internal" href="../library/logging.config#module-logging.config" title="logging.config: Configuration of the logging module."><code>logging.config</code></a>, they won’t take up any memory.</p> </section> <section id="other-resources"> <span id="tutorial-ref-links"></span><h2>Other resources</h2> <div class="admonition seealso"> <p class="admonition-title">See also</p> <dl class="simple"> <dt>
<code>Module</code> <a class="reference internal" href="../library/logging#module-logging" title="logging: Flexible event logging system for applications."><code>logging</code></a>
</dt>
<dd>
<p>API reference for the logging module.</p> </dd> <dt>
<code>Module</code> <a class="reference internal" href="../library/logging.config#module-logging.config" title="logging.config: Configuration of the logging module."><code>logging.config</code></a>
</dt>
<dd>
<p>Configuration API for the logging module.</p> </dd> <dt>
<code>Module</code> <a class="reference internal" href="../library/logging.handlers#module-logging.handlers" title="logging.handlers: Handlers for the logging module."><code>logging.handlers</code></a>
</dt>
<dd>
<p>Useful handlers included with the logging module.</p> </dd> </dl> <p><a class="reference internal" href="logging-cookbook#logging-cookbook"><span class="std std-ref">A logging cookbook</span></a></p> </div> </section> <div class="_attribution">
<p class="_attribution-p">
© 2001–2023 Python Software Foundation<br>Licensed under the PSF License.<br>
<a href="https://docs.python.org/3.12/howto/logging.html" class="_attribution-link">https://docs.python.org/3.12/howto/logging.html</a>
</p>
</div>
|