Simple Logger for LIS.
Project description
lis-simplelogger
Simple Logger for LIS. Simultaneous setup for console logs and file log saves.
Use Example
from lis_simplelogger import LISSimpleLogger
FILEPATH="/my/path"
LIS_SL = LISSimpleLogger (
log_file=f"{FILEPATH}/file.log",
logger_name="my_logger"
)
# this sets up the file and console logger to the specified path
LIS_SL.full_setup()
# file logger independent handling
file_logger = sl.get_file_logger()
file_logger.debug('This is a debug message')
file_logger.info('This is an informational message')
file_logger.warning('This is a warning message')
file_logger.error('This is an error message')
file_logger.critical('This is a critical message')
# console logger independent handling
console_logger = sl.get_console_logger()
console_logger.debug('This is a debug message')
console_logger.info('This is an informational message')
console_logger.warning('This is a warning message')
console_logger.error('This is an error message')
console_logger.critical('This is a critical message')
you can also use a comprehensive functions to log to both the file and the console.
LIS_SL.info_log(msg)
LIS_SL.warning_log(msg)
LIS_SL.error_log(msg)
LIS_SL.critical_log(msg)
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file lis-simplelogger-0.2.0.tar.gz.
File metadata
- Download URL: lis-simplelogger-0.2.0.tar.gz
- Upload date:
- Size: 3.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.11.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e2799710a005bbd92cdb87d315f4a3e981feb26ca90548fcb69854d774e33e25
|
|
| MD5 |
04d796e79011570d56e1c4a4f1720b0f
|
|
| BLAKE2b-256 |
3f2312bd95e394432b6efe45068798ac5b62cf43c344a14b5946d760cb404325
|
File details
Details for the file lis_simplelogger-0.2.0-py3-none-any.whl.
File metadata
- Download URL: lis_simplelogger-0.2.0-py3-none-any.whl
- Upload date:
- Size: 3.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.11.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6517d3a37972d68251f6c765b23fd15e8110a870f40a0602c84f959dde244c39
|
|
| MD5 |
7c52e4c1eb097e528d50ebee6618d64b
|
|
| BLAKE2b-256 |
fd7ce9c16490106432378a2ab7052df46e796ef5263151a74184445c75a3445e
|