Strona zostanie usunięta „Loggers”. Bądź ostrożny.
That library is sync and async ready. Generally have two simular classes, async_logger and sync_logger. All use same functions, but async_logger functions is of course async. For example:
# Sync logger
sync_logger.info("Info message")
# Async logger
await async_logger.info("Info message")
That library have four levels of message:
All levels have own functions, which could be used to write messages. When async_logger is used, then all of them must be used with await. If more parameters had been added to string, then it would be used to call format function on that string. It is useable for example to log IP address. Read more here.
logger.info("Info message")
logger.warning("Message with args {0}", 10)
logger.error("Error")
logger.critical("BUG!")
Loggers could be create simple by call them
Strona zostanie usunięta „Loggers”. Bądź ostrożny.