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

Uploaded Source

Built Distribution

scilogger-1.2.0-py3-none-any.whl (8.9 kB view details)

Uploaded Python 3

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

Hashes for scilogger-1.2.0.tar.gz
Algorithm Hash digest
SHA256 6df23dfc1f34dc097f75f97e248e0e54e381c9063e0a593ca03ccb832144db5e
MD5 62c663ab17b1ea12a14c908d5e2f337f
BLAKE2b-256 626ba48eaa7d42ccfcb8d07cd9c5d5d73353e210233e07a5be18614e23398ac8

See more details on using hashes here.

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

Hashes for scilogger-1.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 2098950a34b72efeeb2cb9af1f09f5a967ec69f71dec6a5584ba4010f0114d6e
MD5 546e6445856f575dda91e658a4a15c40
BLAKE2b-256 a4186672001da1b5287f93107e74efaf4372b7c7ecb26e569d888144e2bc3ec9

See more details on using hashes here.

Supported by

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