SmoothLogging
Effortless logging to both file and console with automatic timestamped filenames.
Features
Simple API for configurable logging to file and console
Automatic timestamped log files (myapp_20240326143022.log)
Consistent log formatting across your application
Full Python 3.7+ support
Type hints for better IDE support
Proper error handling and validation
Installation
pip install smoothlogging
Quick Start
Using the convenience function:
from smoothlogging import get_logger
logger = get_logger("/var/log/myapp", "myapp")
logger.info("Application started")
logger.warning("Something unexpected happened")
logger.error("An error occurred")
Using the SmoothLogging class:
from smoothlogging import SmoothLogging
import logging
smooth = SmoothLogging()
logger = smooth.get_logger("/var/log/myapp", "myapp", level=logging.DEBUG)
# Log to file and console (default)
logger.info("Message with file and console output")
# Create another logger without console output
file_only = smooth.get_logger("/var/log/myapp", "file-only", console=False)
API Reference
get_logger(log_dir, name, level=logging.DEBUG, console=True)
Convenience function to create and configure a logger.
log_dir: Directory for log files (created if doesn’t exist)
name: Logger and log file prefix name
level: Logging level (default: DEBUG)
console: Enable console output (default: True)
Returns: Configured logger instance
SmoothLogging.get_logger(…)
Class method with same parameters as convenience function.
SmoothLogging.get_existing_logger(name)
Retrieve a previously created logger by name. - Returns: Logger instance or None if not found
# CI/CD Fixed
Metadata
Release files for smoothlogging 1.0.0
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 |
|---|---|---|---|---|
| smoothlogging-1.0.0.tar.gz | 58.7 kB | Without provenance | Details for smoothlogging-1.0.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| smoothlogging-1.0.0-py2.py3-none-any.whl | Python 3, Python 2 | none | any | Details for smoothlogging-1.0.0-py2.py3-none-any.whl |
Total release size: 64.1 kB
Release files / smoothlogging-1.0.0.tar.gz
| Download URL | smoothlogging-1.0.0.tar.gz |
|---|---|
| Size | 58.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
9f88525f6d0a80edb89d6b5d04cf934a43d5a258d3a1ac7f847052612e502b2b
|
|
BLAKE2b-256 checksum How to use checksums |
c431d6bf5741616a309f0fd8654532bb815a8958d4b0d57dcd1a8b59d601ec55
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Release files / smoothlogging-1.0.0-py2.py3-none-any.whl
| Download URL | smoothlogging-1.0.0-py2.py3-none-any.whl |
|---|---|
| Size | 5.5 kB |
| Tags | Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
ee892e5fadc739d636946a7a0438201f70e232213cc7962eeed8de6712655611
|
|
BLAKE2b-256 checksum How to use checksums |
7a7105657ef6c1c56e735a1e552003e687441bc0d2eb7e33feca47fb5e1d42b0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Security for smoothlogging 1.0.0
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.