- Add support for coroutine functions used as sinks and add the new
logger.complete()
asynchronous method toawait
them (#171). - Add a way to filter logs using one level per module in the form of a
dict
passed to thefilter
argument (#148). - Add type hints to annotate the public methods using a
.pyi
stub file (#162). - Add support for
copy.deepcopy()
of thelogger
allowing multiple independent loggers with separate set of handlers (#72). - Add the possibility to convert
datetime
to UTC before formatting (in logs and filenames) by adding"!UTC"
at the end of the time format specifier (#128). - Add the level
name
as the first argument of namedtuple returned by the.level()
method. - Remove
class
objects from the list of supported sinks and restrict usage of**kwargs
in.add()
to file sink only. User is in charge of instantiating sink and wrapping additional keyword arguments if needed, before passing it to the.add()
method. - Rename the
logger.configure()
keyword argumentpatch
topatcher
so it better matches the signature oflogger.patch()
. - Fix incompatibility with
multiprocessing
on Windows by entirely refactoring the internal structure of thelogger
so it can be inherited by child processes along with added handlers (#108). - Fix
AttributeError
while using a file sink on some distributions (like Alpine Linux) missing theos.getxattr
andos.setxattr
functions (#158, thanks @joshgordon). - Fix values wrongly displayed for keyword arguments during exception formatting with
diagnose=True
(#144). - Fix logging messages wrongly chopped off at the end while using standard
logging.Handler
sinks with.opt(raw=True)
(#136). - Fix potential errors during rotation if destination file exists due to large resolution clock on Windows (#179).
- Fix an error using a
filter
function "by name" while receiving a log withrecord["name"]
equals toNone
. - Fix incorrect record displayed while handling errors (if
catch=True
) occurring because of non-picklable objects (ifenqueue=True
). - Prevent hypothetical
ImportError
if a Python installation is missing the built-indistutils
module (#118). - Raise
TypeError
instead ofValueError
when alogger
method is called with argument of invalid type. - Raise
ValueError
if the built-informat()
andfilter()
functions are respectively used asformat
andfilter
arguments of theadd()
method. This helps the user to understand the problem, as such a mistake can quite easily occur (#177). - Remove inheritance of some record dict attributes to
str
(for"level"
,"file"
,"thread"
and"process"
). - Give a name to the worker thread used when
enqueue=True
(#174, thanks @t-mart).