A global logger with automatic configuration loading
Project description
Globalog
A Python package providing a global logger with automatic configuration loading.
Installation
pip install globalog
Usage
from globalog import LOG
# The logger will automatically load configuration from the nearest config file
LOG.info("This is an info message")
LOG.debug("This is a debug message")
# You can also explicitly initialize with a specific config file
LOG.init(config_file="path/to/config.json")
Configuration
The package looks for configuration files in the following order:
logging_config.jsonin the current directorylogging_config.yamlin the current directory- Default configuration if no config file is found
Example configuration file (logging_config.json):
{
"version": 1,
"disable_existing_loggers": false,
"formatters": {
"standard": {
"format": "%(asctime)s - %(name)s - %(levelname)s - %(message)s"
}
},
"handlers": {
"console": {
"class": "logging.StreamHandler",
"level": "INFO",
"formatter": "standard",
"stream": "ext://sys.stdout"
}
},
"loggers": {
"": {
"handlers": ["console"],
"level": "INFO",
"propagate": true
}
}
}
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 Distribution
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 globalog-0.1.0.tar.gz.
File metadata
- Download URL: globalog-0.1.0.tar.gz
- Upload date:
- Size: 3.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.0.1 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7c2b5473a553ca41fe3c7ad41baf32bb9f7f174bdcc3dad3c4d095d100db46c2
|
|
| MD5 |
716882d3067f79572fd677db4baadd28
|
|
| BLAKE2b-256 |
eb02421ef9c99fb447ebc1379f05f99359c9ea7a1d48325d59e4afde47a9fda2
|
Provenance
The following attestation bundles were made for globalog-0.1.0.tar.gz:
Publisher:
python-publish.yml on ronpik/globalog
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
globalog-0.1.0.tar.gz -
Subject digest:
7c2b5473a553ca41fe3c7ad41baf32bb9f7f174bdcc3dad3c4d095d100db46c2 - Sigstore transparency entry: 159070648
- Sigstore integration time:
-
Permalink:
ronpik/globalog@62c1b5de30f82e046dc2114b3fb51ad5850d2b5f -
Branch / Tag:
refs/tags/0.1.0 - Owner: https://github.com/ronpik
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@62c1b5de30f82e046dc2114b3fb51ad5850d2b5f -
Trigger Event:
release
-
Statement type:
File details
Details for the file globalog-0.1.0-py3-none-any.whl.
File metadata
- Download URL: globalog-0.1.0-py3-none-any.whl
- Upload date:
- Size: 3.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.0.1 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
eb74479e51afda515104535c226605417b8e6e1037c255ef16d3a7966d5145a4
|
|
| MD5 |
8ef867a6ae07c6ae89dc6ccb35459b8c
|
|
| BLAKE2b-256 |
f591fc020b558b468e24828c22b4639f9339a1eb2c46b07a3f1f4a9f939f2f16
|
Provenance
The following attestation bundles were made for globalog-0.1.0-py3-none-any.whl:
Publisher:
python-publish.yml on ronpik/globalog
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
globalog-0.1.0-py3-none-any.whl -
Subject digest:
eb74479e51afda515104535c226605417b8e6e1037c255ef16d3a7966d5145a4 - Sigstore transparency entry: 159070654
- Sigstore integration time:
-
Permalink:
ronpik/globalog@62c1b5de30f82e046dc2114b3fb51ad5850d2b5f -
Branch / Tag:
refs/tags/0.1.0 - Owner: https://github.com/ronpik
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@62c1b5de30f82e046dc2114b3fb51ad5850d2b5f -
Trigger Event:
release
-
Statement type: