A simple logging library for Python
Project description
Logmaster
A simple logging package for
Installation
pip install logmaster
note: this package is not yet on PyPI, so you will have to install it from source. Depending on your python installation, the command mayt vary. For example, if you are using python3, you may need to use
pip3
instead ofpip
.
Usage
from logmaster import Logger
logger = Logger("my_log_file.log")
logger.log("info", "Hello, world!")
Documentation
Logger
Logger(path: str)
Creates a new logger object. The path argument is the path to the log file. If the file does not exist, it will be created. If it does exist, it will be appended to.
Logger.log(level: str, message: str, additional_info: Optional[str])
Logs a message to the log file. The level argument is the level of the message. The message argument is the message to log. The additional_info argument is optional, and is used to provide additional information about the message.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for logmaster-0.1.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 49d736ae888a43cd876a53f43f14ff693225bb2d7698515f18039c062dc5ef1a |
|
MD5 | 1f08de75d9656123b0f06e14e9cc98f9 |
|
BLAKE2b-256 | d463005d3fec65bd3a305b466828fd103edf85bbb588a3a7d829a25214f0c167 |