SciLogger - Python Logging for Science
Project description
SciLogger - Python Logging for Science
- Repository: github.com/otvam/scilogger
- PyPi: pypi.org/project/scilogger
- Conda: anaconda.org/conda-forge/scilogger
Summary
SciLogger is a Python Logging module:
- Specially targeted for scientific applications.
- Use a global timer to measure the elapsed time.
- Provide a class for timing code blocks.
- Definition of custom indentation levels.
- Definition of colors for the logging levels.
SciLogger is using a global INI configuration file:
- First, the default configuration is loaded (
scilogger/scilogger.ini
). - Afterward, a custom file can be loaded with an environment variable (
SCILOGGER
)
SciLogger is written in Python without any external dependencies.
Warning
- This logging module is based on the Python logging module.
- The philosophy of this logging module is slightly different.
- Mixing both modules can create strange/incorrect behaviors.
Example
An example is located in the example
folder of the repository:
run_logger.py
contains an example file for the loggerconfiglogger.ini
contains a custom configuration file
# Set the configuration file.
export SCILOGGER="configlocal.ini"
# Run the Python script.
python run_logger.py
Project Links
- Repository: https://github.com/otvam/scilogger
- Releases: https://github.com/otvam/scilogger/releases
- Tags: https://github.com/otvam/scilogger/tags
- Issues: https://github.com/otvam/scilogger/issues
- PyPi: https://pypi.org/project/scilogger
- Conda: https://anaconda.org/conda-forge/scilogger
Author
- Thomas Guillod
- Email: guillod@otvam.ch
- Website: https://otvam.ch
Copyright
(c) 2023 - Thomas Guillod
BSD 2-Clause "Simplified" License
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
scilogger-1.2.0.tar.gz
(10.6 kB
view details)
Built Distribution
File details
Details for the file scilogger-1.2.0.tar.gz
.
File metadata
- Download URL: scilogger-1.2.0.tar.gz
- Upload date:
- Size: 10.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.10.15
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6df23dfc1f34dc097f75f97e248e0e54e381c9063e0a593ca03ccb832144db5e |
|
MD5 | 62c663ab17b1ea12a14c908d5e2f337f |
|
BLAKE2b-256 | 626ba48eaa7d42ccfcb8d07cd9c5d5d73353e210233e07a5be18614e23398ac8 |
File details
Details for the file scilogger-1.2.0-py3-none-any.whl
.
File metadata
- Download URL: scilogger-1.2.0-py3-none-any.whl
- Upload date:
- Size: 8.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.10.15
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2098950a34b72efeeb2cb9af1f09f5a967ec69f71dec6a5584ba4010f0114d6e |
|
MD5 | 546e6445856f575dda91e658a4a15c40 |
|
BLAKE2b-256 | a4186672001da1b5287f93107e74efaf4372b7c7ecb26e569d888144e2bc3ec9 |