log.py
📖
About:
A basic logging library for Python with the capability to:
- save to files.
- have custom formats.
- have custom levels.
- be used instantiated.
- be used non-instantiated.
📝
Basic Usage:
(For more advanced uses, please refer to the given examples or the documentation.)
Instantiated:
- Code:
from logpy import Logger
from logpy.log import Levels
logger = Logger()
logger.log("Hello World!")
logger.log("Oh no, something went wrong!", Levels.error)
Non-instantiated:
- Code:
from logpy import Logger
from logpy.log import Levels
Logger.slog("Hello World!")
Logger.slog("Oh no, something went wrong!", Levels.error)