Skip to main content

Custom python logging module

Project description

Python Custom Logging Module

This is a custom logging module for Python. It is a simple module that allows you to log messages to a file and/or the console. It also allows you to set the log level so that you can control which messages get logged.

Installation

  1. Automatically install the module using pip:
pip install emoji_logger
  1. Manually install the module: Way 1. To install the module, simply copy the logging.py file to your project directory.

Usage

Here is an example of how to use the module:

from emoji_logger import Logger # < This is a logger class what you can use to create a logger object
from emoji_logger import logger # < This is a logger object what you can use directly (level: INFO)

logger.debug("This is a debug message")
logger.info("This is an info message")
logger.warning("This is a warning message")
logger.error("This is an error message")
logger.critical("This is a critical message")

Example

==================================================
2025-01-24 22:31:52 | DEBUG | TEST
main.py | debug | 193
--------------------------------------------------
🛠️ | main | test debug
==================================================
==================================================
2025-01-24 22:31:59 | INFO | TEST
main.py | info | 197
--------------------------------------------------
📚 | main | test info
==================================================
==================================================
2025-01-24 22:31:59 | WARNING | TEST
main.py | warning | 201
--------------------------------------------------
🔥 | main | test warning
==================================================
==================================================
2025-01-24 22:31:59 | ERROR | TEST
main.py | error | 205
--------------------------------------------------
⛔️ | main | test error
==================================================
==================================================
2025-01-24 22:31:59 | DEBUG | TEST
main.py | debug | 193
--------------------------------------------------
🛠️ | main | test debug
==================================================

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

emoji_logger-0.1.17.tar.gz (23.2 kB view details)

Uploaded Source

Built Distribution

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

emoji_logger-0.1.17-py3-none-any.whl (5.0 kB view details)

Uploaded Python 3

File details

Details for the file emoji_logger-0.1.17.tar.gz.

File metadata

  • Download URL: emoji_logger-0.1.17.tar.gz
  • Upload date:
  • Size: 23.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.7.6

File hashes

Hashes for emoji_logger-0.1.17.tar.gz
Algorithm Hash digest
SHA256 df8cf181e1bcb66cb45583506fe3e8a8413d67c849523cb6953112ec264457fa
MD5 7bd4325ac7b40b23840dba9956b1b7b8
BLAKE2b-256 e8e46cd7c5544c2c41d390410becf8be2b1af914011dee1c921d8d0d27cffd08

See more details on using hashes here.

File details

Details for the file emoji_logger-0.1.17-py3-none-any.whl.

File metadata

File hashes

Hashes for emoji_logger-0.1.17-py3-none-any.whl
Algorithm Hash digest
SHA256 7dd4f74a15101bb3a1e613fd5c2c5427bfd376ce2026c7d164f346033c769e5c
MD5 6b43a223aea6fa45d2d97ab3f1f8223c
BLAKE2b-256 3d3e2d2d4c21cda39df8f61572e3e26004893a5727d48b5c7d060c57026a58ce

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