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.16.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.16-py3-none-any.whl (5.0 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for emoji_logger-0.1.16.tar.gz
Algorithm Hash digest
SHA256 bc787ee9f97ecbc6daf9e350d4571bb0cc727174ae2e683e3d708554503ca6b1
MD5 789a79743dc24cfe98027b3b9b5e8278
BLAKE2b-256 1fbbd1f7ee5df7c3d615eb147a68fa548fe2b46b4baa4d2b95de2c6879b6ff86

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for emoji_logger-0.1.16-py3-none-any.whl
Algorithm Hash digest
SHA256 b0a8138322799a8c0bbd8b694231da4c1d27a4a5d89176dadc6cb535c86dc1a9
MD5 39deea00e46f877c68759e31a1cbdb33
BLAKE2b-256 2b3c4175886c25bce2ae7a537f88961322c658730ddb43382627b9d70ec46d3a

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