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.

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.1.tar.gz (10.9 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.1-py3-none-any.whl (9.0 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: scilogger-1.2.1.tar.gz
  • Upload date:
  • Size: 10.9 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.1.tar.gz
Algorithm Hash digest
SHA256 4ede99bf4ee7b959b81223ce8a835a3c29b16bbafe2f3c2eb1341c1b4fe7858b
MD5 05837ec0cc8eff5c3e598ccdfd35f404
BLAKE2b-256 817fd3169cc1b6fde4ce9ee930f2cb050d6a4af250e460c8ec24bf25e80bfce4

See more details on using hashes here.

File details

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

File metadata

  • Download URL: scilogger-1.2.1-py3-none-any.whl
  • Upload date:
  • Size: 9.0 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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 f18ca5c05902237752f527391283d86a0b75543c92687f22b42991090eedfa81
MD5 e15de4e7ac58d2a2bfcf61b6c15bf6bc
BLAKE2b-256 049745bc2c74cd3be94a800a70f435ffe54962e30fa3fc01d2e559ea29947e2f

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