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.2.tar.gz
(7.8 kB
view hashes)
Built Distribution
Close
Hashes for py_logging-1.0.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d341d645d808613fba58c21ae54f31b19bf280385d019e61bfa853036150b9aa |
|
MD5 | cfa4f89d24a00d62184a73dd26f447f5 |
|
BLAKE2b-256 | 8f290a336d7916cb9d4677d42554ed8296bafdbe25bdf417a6f264f354c283fe |