LogAssist
A simple and customizable logging library for Python.
Installation
pip install LogAssist
Features
- Easy to use and configure
- Supports multiple log levels (debug, info, warning, error)
- Outputs log messages to both console and file
- Allows for log file removal on initialization
- Provides datetime formatting for log messages
Usage
- Import the Logger class:
import LogAssist.log as Logger
- Initialize the logger with your desired settings:
Logger.logger_init(config=my_config_dictionary)
# or
Logger.logger_init()
- Use the logger in your code:
Logger.verbose('MyTag', 'This is a verbose message')
Logger.debug('MyTag', 'This is a debug message')
Logger.info('MyTag', 'This is an info message')
Logger.warn('MyTag', 'This is a warning message')
Logger.error('MyTag', 'This is an error message')
Logger.exception('MyTag', 'This is a exception message')
Configuration
You can configure the logger using a JSON configuration. Below is an example of a configuration and explanations for each field.
Example Usage:
{
"base": {
"name": "MyLogger",
"level": "debug",
"trace_output": "true"
},
"console": {
"level": "debug",
"format": "%(asctime)s[%(levelname)s]%(message)s"
},
"file_timed": {
"level": "info",
"format": "%(asctime)s[%(levelname)s]%(message)s",
"file_name": "default.log",
"when": "midnight",
"interval": 1,
"backup_count": 30
}
}
Configuration Fields
base
- name: The identifier for the logger. Default is 'MyLogger'.
- level: The minimum log level to set (debug, info, warn, error, exception). Default is 'debug'.
console
- level: The minimum log level for console output (debug, info, warn, error, exception). Default is 'debug'.
- format: Defines the log message format for console output. Default is %(asctime)s[%(levelname)s]%(message)s.
file_timed
- level: The minimum log level for file output (debug, info, warn, error, exception). Default is 'info'.
- format: Defines the log message format for file output. Default is %(asctime)s[%(levelname)s]%(message)s.
- file_name: The file name to use for logging. Default is 'default.log'.
- when: The time interval for rotating the log file (e.g., 'midnight'). Default is 'midnight'.
- interval: Defines how often the log file is rotated. Default is 1.
- backup_count: Specifies the number of backup files to keep. Default is 30.
Use this JSON configuration to initialize your logger with the desired settings.
Metadata
Release files for LogAssist 1.1.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 | Actions |
|---|---|---|---|---|
| logassist-1.1.5.tar.gz | 4.6 kB | Without provenance | Details for logassist-1.1.5.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| logassist-1.1.5-py3-none-any.whl | Python 3 | none | any | Details for logassist-1.1.5-py3-none-any.whl |
Total release size: 9.2 kB
Release files / logassist-1.1.5.tar.gz
| Download URL | logassist-1.1.5.tar.gz |
|---|---|
| Size | 4.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
e1bf6c0933d871fd6db0cdc40bb2e22d0356526ea7c6c647faaf89f06ae58968
|
|
BLAKE2b-256 checksum How to use checksums |
5b02083f2ecc4d7d7277d18c359dc5e9106b319c685029939b36894491eb414a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.2
|
Release files / logassist-1.1.5-py3-none-any.whl
| Download URL | logassist-1.1.5-py3-none-any.whl |
|---|---|
| Size | 4.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
b4124d65de0c51ab558e0ea394c080f140e68307639dff8a8d652f6fd5a0fcb2
|
|
BLAKE2b-256 checksum How to use checksums |
0bc1016d11610948cbc10ebcef22a7c449d050d8e074f218612a72de312b8bff
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.2
|
Security for LogAssist 1.1.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.
To learn more about protecting yourself from malicious actors, visit our package security documentation.