Skip to main content

Library for logging facility

Project description

Overview

It is an utility library which allow you to use a common interface accross all its component to log messages with different levels.

Logging levels

It use the standard logging levels widely used on all systems:

# Levels
0 EMERGENCY
1 ALERT
2 CRITICAL
3 ERROR
4 WARNING
5 NOTICE
6 INFO
7 DEBUG

Installation

TODO

Logging components

Type Status Description
CLILogger Available It outputs logging messsages to STDOUT
FileLogger Planned It will outputs logging messages directly to file

CLI Logger

This logging components allow you to outputs logging information and raises and exception from critical level and above.

Usage

# Import the dependency
from clagiordano.python3_logger.CLILogger import CLILogger

# Init the component
logger = CLILogger()

# Use it to log something
logger.info("Sample info message")
logger.error("Sample error message")
logger.critical("Sample critical message")

Ad default it uses ANSI colors but you can toggle the ansi flag but you can easily toggle off this feature using the following code:

logger.set_ansi(False)

Sample ANSI output (default)

Sample ANSI output

Sample ANSI OFF output

Sample ANSI OFF output

Contributing

Please read CONTRIBUTING.md for details on our code of conduct, and the process for submitting pull requests to us.

Versioning

We use SemVer for versioning. For the versions available, see the releases on this repository.

Authors

See also the list of contributors who participated in this project.

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

clagiordano.python3-logger-1.1.0.tar.gz (105.3 kB view details)

Uploaded Source

Built Distribution

File details

Details for the file clagiordano.python3-logger-1.1.0.tar.gz.

File metadata

  • Download URL: clagiordano.python3-logger-1.1.0.tar.gz
  • Upload date:
  • Size: 105.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.12 CPython/3.10.4 Linux/5.16.0-6-amd64

File hashes

Hashes for clagiordano.python3-logger-1.1.0.tar.gz
Algorithm Hash digest
SHA256 9b1eb0df4881aa270963bddf5d99757484825f1593232d61dad43711d1aa35b6
MD5 fe2d32e1ab1ef0ab44cc7f0098f9345d
BLAKE2b-256 4aaf0a65a0ed5b46e537267ce6e949449a0837159a903dead3d7ab997dc0567f

See more details on using hashes here.

File details

Details for the file clagiordano.python3_logger-1.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for clagiordano.python3_logger-1.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 2c061e2d74f0a808941528db9f36583de5f972248093ce9088c6bce98b57c933
MD5 bc8d1cac6d7421fb8a3ac1cdde3899a4
BLAKE2b-256 0ec4a9b41464eec89a9a6768e28a6f323ec4b220b7a16d210a5fbe84eb5e9506

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