Skip to content
This repository has been archived by the owner on Mar 18, 2023. It is now read-only.

Szczurowsky-playground/py-logging

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

py-logging

Configurable and easy extendable python logger

Build with python That works?

Status:

Branch Tests Code Quality
master buddy pipeline CodeFactor Grade

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")

showcase

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")
showcase
List
from pylogging.logger import Logger
from pylogging.log_level import LogLevel

logger = Logger()

logger.log(LogLevel.INFO, ["List", "List"])
showcase
Dictionary
from pylogging.logger import Logger
from pylogging.log_level import LogLevel

logger = Logger()

logger.log(LogLevel.INFO, {"1": "Value1", "2": "Value2"})
showcase

About

Configurable and easy extendable python logger

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages