Automate IT operations
Project description
Quick using logger
This small project purpose is to add nice and clean logs to your app.
Just import the quickbelog.Log
class wherever you need and start using it.
To make debugging easier by default it will include the name of the source file and line number in order to understand what code line is responsible for the output.
from quickbelog import Log
Log.info(msg='This is an info message')
Log.debug(msg='This is a debug message')
Log.warning(msg='This is a warning message')
Log.error(msg='This is an error message')
try:
raise ValueError('Just for testing')
except ValueError:
quickbe.Log.exception('Something failed')
Here are some examples
2022-03-14 15:54:03,411 > INFO test_logger.py(17) method: test_basic_log_message This is an info message
2022-03-14 15:54:03,411 > DEBUG test_logger.py(21) method: test_debug_message This is a debug message
2022-03-14 15:54:03,411 > WARNING test_logger.py(29) method: test_warning_message This is a warning message
2022-03-14 15:54:03,412 > ERROR test_logger.py(33) method: test_error_message This is an error message
2022-03-14 15:54:03,412 > ERROR test_logger.py(13) method: test_exception_logging Something failed
Traceback (most recent call last):
File ".\test_logger.py", line 11, in test_exception_logging
raise ValueError('Just for testing')
ValueError: Just for testing
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
quickbelog-1.0.0.tar.gz
(3.4 kB
view hashes)
Built Distribution
Close
Hashes for quickbelog-1.0.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 774dbf4c6cd8d792101acac13d47c0efae1431cd2cf8160043b36b5971f1a6bb |
|
MD5 | dbb81b1ecedc4d561bc34d56d91dce24 |
|
BLAKE2b-256 | ff24f5a701a8a7ce2b4e53a625d29b71647da1004fc10d39592079025324b70d |