August 2018
Intermediate to advanced
366 pages
10h 14m
English
As we relied on dictConfig, you noticed that our configuration is a bit more complex than in previous recipes. This is because we configured the bits that are part of the logging infrastructure ourselves.
Whenever you configure logging, you write your messages with a logger. By default, the system only has one logger: the root logger (the one you get if you call logging.getLogger without providing any specific name).
The logger doesn't handle messages itself, as writing or printing log messages is something handlers are in charge of. Consequently, if you want to read the log messages you send, you need to configure a handler. In our case, we use SysLogHandler, which writes to Syslog.
Handler is then in charge of writing a ...