Skip to main content

SciLogger - Python Logging for Science

Project description

SciLogger - Python Logging for Science

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. SciLogger is respecting semantic versioning (starting from version 1.2).

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 logger
  • configlogger.ini contains a custom configuration file
# Set the configuration file.
export SCILOGGER="configlocal.ini"

# Run the Python script.
python run_logger.py

Project Links

Author

Copyright

(c) 2023 - Thomas Guillod

BSD 2-Clause "Simplified" License

Project details


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.2.tar.gz (11.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

scilogger-1.2.2-py3-none-any.whl (9.1 kB view details)

Uploaded Python 3

File details

Details for the file scilogger-1.2.2.tar.gz.

File metadata

  • Download URL: scilogger-1.2.2.tar.gz
  • Upload date:
  • Size: 11.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.11.11

File hashes

Hashes for scilogger-1.2.2.tar.gz
Algorithm Hash digest
SHA256 df0c2e532a154e5fa2a8f04de71cd37834a895f16464b52858735f5e2224d4ab
MD5 7560cf790b91ca431c606107424d3e4c
BLAKE2b-256 1d8c1907388b652cfa0043ef79d673bc31b4ea586d7ee7ebc1d189b16e5ffc89

See more details on using hashes here.

File details

Details for the file scilogger-1.2.2-py3-none-any.whl.

File metadata

  • Download URL: scilogger-1.2.2-py3-none-any.whl
  • Upload date:
  • Size: 9.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.11.11

File hashes

Hashes for scilogger-1.2.2-py3-none-any.whl
Algorithm Hash digest
SHA256 71a4c58421492de350354a8929f956ce29227c1c38fd00b18265d00745dd27fd
MD5 b220a5e033bc797bc534a745bf59e443
BLAKE2b-256 d2b0e8ef86222eadd48fba4e6f4caca1059475df1e4a457d7293a8d07e4c19bb

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page