Configurable and easy extendable python logger.
Project description
py-logging
Configurable and easy extendable python logger
Status:
Branch | Tests | Code Quality |
---|---|---|
master |
Usage
Basic
from pylogging.logger import Logger
from pylogging.log_level import LogLevel
logger = Logger()
logger.log(LogLevel.INFO, "Connection initialized")
logger.log(LogLevel.WARNING, "The rat bit your cables")
logger.log(LogLevel.ERROR, "The plague of rats in the server room")
Formatters
Scope
from pylogging.logger import Logger
from pylogging.log_level import LogLevel
logger = Logger()
logger.set_options({"scope": True})
logger.log(LogLevel.ERROR, "Cannot connect to host")
List
from pylogging.logger import Logger
from pylogging.log_level import LogLevel
logger = Logger()
logger.log(LogLevel.INFO, ["List", "List"])
Dictionary
from pylogging.logger import Logger
from pylogging.log_level import LogLevel
logger = Logger()
logger.log(LogLevel.INFO, {"1": "Value1", "2": "Value2"})
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
py-logging-1.0.1.tar.gz
(7.8 kB
view hashes)
Built Distribution
Close
Hashes for py_logging-1.0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4d5a1b70d5c0facf170c20cd62f540e43837a1fae69fc5c42b4d4f93139a3b24 |
|
MD5 | 405fa49d2b73b382f6ff57e2b1af433b |
|
BLAKE2b-256 | ba09e1e7cd9dec2acd64785efdfd61ff9be4c52c6f64eddde9ab004050714b1f |