Package to create log files with using TimedRotatingFileHandler
Project description
python_custom_logging
logpath = "YOUR LOG PATH/LOG_FILE_NAME.log"
loggername = "YOUR LOGGER NAME"
logformat = ("%(asctime)s [%(levelname)s]: %(lineno)d : %(message)s ") --YOUR LOG FORMAT
log_level = logging.INFO -- YOUR LOG LEVEL
logfilehandlertime = "H" -- logfilehandlertime (H,M,S)
interval = 1 - intreval of time 1 hour,1 sec ,1 minutes
backupCount=0 file we keep of logs if 0 mean all log file will be there and if set to 2 then latest 2 log file will be there and rest will be deleted
Create obj before use
from python_custom_logging import *
logging_config_obj=python_custom_logging(logpath,loggername,logformat,log_level,logfilehandlertime,interval,backupCount).create_log()
For Example:
logging_config_obj.info('YOUR LOGS')
logging_config_obj.error('YOUR LOGS')
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 Distributions
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 python_custom_logging-1.0.1-py3-none-any.whl.
File metadata
- Download URL: python_custom_logging-1.0.1-py3-none-any.whl
- Upload date:
- Size: 2.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4744cfe52a85be0a44cc0c837c5d86d92e073b26094ef68f875c591f251ab61d
|
|
| MD5 |
5c4d1fc4330c142aab80ed992537f8b2
|
|
| BLAKE2b-256 |
936aa2f3a1da72af809ed790616b1a42d28ae4ed01bbba732afe3aaea7ce4731
|