Help & GuidesΒΆ
- Introduction to Logging in Python
- Switching from standard
loggingtologuru- Fundamental differences between
loggingandloguru - Replacing
getLogger()function - Replacing
Loggerobjects - Replacing
Handler,FilterandFormatterobjects - Replacing
%style formatting of messages - Replacing
exc_infoargument - Replacing
extraargument andLoggerAdapterobjects - Replacing
isEnabledFor()method - Replacing
addLevelName()andgetLevelName()functions - Replacing
basicConfig()anddictConfig()functions - Replacing
captureWarnings()function - Replacing
assertLogs()method fromunittestlibrary - Replacing
caplogfixture frompytestlibrary
- Fundamental differences between
- Code snippets and recipes for
loguru- Security considerations when using Loguru
- Avoiding logs to be printed twice on the terminal
- Changing the level of an existing handler
- Configuring Loguru to be used by a library or an application
- Sending and receiving log messages across network or processes
- Resolving
UnicodeEncodeErrorand other encoding issues - Logging entry and exit of functions with a decorator
- Using logging function based on custom added levels
- Setting permissions on created log files
- Preserving an
opt()parameter for the whole module - Serializing log messages using a custom function
- Rotating log file based on both size and time
- Adapting colors and format of logged messages dynamically
- Dynamically formatting messages to properly align values with padding
- Customizing the formatting of exceptions
- Displaying a stacktrace without using the error context
- Manipulating newline terminator to write multiple logs on the same line
- Capturing standard
stdout,stderrandwarnings - Circumventing modules whose
__name__value is absent - Interoperability with
tqdmiterations - Using Loguru's
loggerwithin a Cython module - Creating independent loggers with separate set of handlers
- Compatibility with
multiprocessingusingenqueueargument