How to install
pip install AshLogger
Documentation
from AshLogger import AshLogger
logger_obj = AshLogger(
file_name='logger_file_name.log' # If `file_name` is not given, it will set logger file name as `AshLogger.log`
, file_location=os.path.join(os.path.dirname(os.path.abspath(__file__)), 'logs') # If log file path not given, it will create a log/ dir where the calling python file is located.
, max_bytes=20000 # default: 1000000
, max_backups=3 # default: 1
, logger_name='app1_logger'
)
logger = logger_obj.setup_logger() # `logger_obj.setup_basic_logger()` for no formattings like timestamps etc, in the log file after logging data.
# * Testing logger
logger.info(f'{1} info log')
logger.debug('%s debug log', 2)
logger.warning('{0} warning log'.format(3))
logger.error('4 error log')
# ! USE ANY ONE TYPE OF LOGGER IN A SINGLE FILE, EITHER ABOVE OR BELOW.
# No need to make object for the class AshLogger, as @classmethod is used as alternative constructor.
basic_logger = AshLogger.setup_basic_logger(
file_name='basic_logger_file_name.log' # If `file_name` is not given, it will set logger file name as `AshBasicLogger.log`.
, file_location=os.path.join(os.path.dirname(os.path.abspath(__file__)), 'logs') # If log file path not given, it will create a log/ dir where the calling python file is located.
, logger_name='app1_logger'
)
# * Testing basic logger
basic_logger.info(f'{1} info log')
basic_logger.debug('%s debug log', 2)
basic_logger.warning('{0} warning log'.format(3))
basic_logger.error('4 error log')
License
Metadata
Release files for AshLogger 0.5
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| AshLogger-0.5.tar.gz | 17.7 kB | Without provenance | Details |
Release files / AshLogger-0.5.tar.gz
| Download URL | AshLogger-0.5.tar.gz |
|---|---|
| Size | 17.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
78511b7e284701e71d5f1b8491d540cc8d386c45b14e957ec38e68022d00aadb
|
|
BLAKE2b-256 checksum How to use checksums |
ecb45efd4b59dc92c24748dae9e9bf38e5a874722927b5101cd292189170292f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.11.7
|
Security for AshLogger 0.5
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.