Lumberstack
Global init in __main__
Example to determine log file name
if helpers.am_debugging:
log_file_name = f'{config.log_file.rstrip(".log")}_debug.log'
if os.path.exists(log_file_name):
os.remove(log_file_name)
else:
log_file_name = (f'{config.log_file.rstrip(".log")}_'
f'{str(datetime.now() if helpers.am_debugging else datetime.utcnow()).split(".", 1)[0].replace(":", ".").replace(" ", "_")}'
'.log')
Only run global_init once in __main__
Lumberstack.global_init(timezone=time.localtime if helpers.am_debugging else time.gmtime, log_filename=log_file_name, log_level=config.log_level, console_output=True)
Add a custom handler during global init
fh = logging.FileHandler(filename='new.log')
Lumberstack.global_init(log_level=config.log_level, custom_handlers=[fh])
Update log levels of imported libraries using the logging package
Lumberstack.update_library_levels(libraries=['requests', 'urllib3'], log_level=config.lib_log_level)
Lumberstack.update_library_levels(libraries=['cli.azure.cli.core', 'cli.knack.cli', 'msal.authority', 'msal.application', 'msal.telemetry'], log_level=config.az_log_level)
Local init for each file/module
logger = Lumberstack()
logger.info(f'{APP_NAME} - {APP_DESCRIPTION}')
Log levels use the logging package values
- CRITICAL = 50
- FATAL = CRITICAL
- ERROR = 40
- WARNING = 30
- WARN = WARNING
- INFO = 20
- DEBUG = 10
- NOTSET = 0
Metadata
Release files for lumberstack 26.4.1400
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 |
|---|---|---|---|---|
| lumberstack-26.4.1400.tar.gz | 7.9 kB | Without provenance | Details for lumberstack-26.4.1400.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| lumberstack-26.4.1400-py3-none-any.whl | Python 3 | none | any | Details for lumberstack-26.4.1400-py3-none-any.whl |
Total release size: 16.5 kB
Release files / lumberstack-26.4.1400.tar.gz
| Download URL | lumberstack-26.4.1400.tar.gz |
|---|---|
| Size | 7.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
32281f1f992b0d83b1feb1c4baedbfca27a3f5a4a21c6add13eac2af6dee5d0d
|
|
BLAKE2b-256 checksum How to use checksums |
e877ebddb868fb7be26ace979ecdc58ed4ee0290e7b44b8e918294b761f89a26
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.12.1
|
Release files / lumberstack-26.4.1400-py3-none-any.whl
| Download URL | lumberstack-26.4.1400-py3-none-any.whl |
|---|---|
| Size | 8.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
689726cecaad27d9586c1e2806ff10b0619787b37bee6839b02e013a10434391
|
|
BLAKE2b-256 checksum How to use checksums |
3b76336f0d00a09a721d6acd93b04851f5303d3be2789c96942ef0a00015bdc0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.12.1
|
Security for lumberstack 26.4.1400
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.