Skip to main content

Python için renkli, detaylı ve pratik günlükleme (logging) kütüphanesi

Project description

DetayLog

A minimalist, colorful, and zero-dependency logging library for Python.


Key Features

  • Colorized Console Output: Distinct ANSI colors for each log level (INFO, SUCCESS, WARNING, ERROR, CRITICAL).
  • Automatic File Logging: Saves logs to a specified file with precise timestamps.
  • Location Tracking: Automatically identifies and logs the source filename and line number ([file.py:line]).
  • Zero External Dependencies: Built entirely with pure Python standard library modules (datetime, os, inspect, traceback).
  • Exception Handling: Log complete stack traces effortlessly using log.exception().

Installation

Install the package directly via pip:

pip install detaylog


Quick Start & Usage

from detaylog import DetayLog

Initialize the logger

log = DetayLog(log_file="app.log", show_location=True)

Log messages with different severity levels

log.info("System starting up...") log.success("Database connection established!") log.warning("User entered incorrect password.") log.error("Server unresponsive.") log.critical("System memory critically high at 99%!")

Automatic Exception Logging (Traceback)

try: result = 10 / 0 except Exception: log.exception("An unexpected math error occurred!")


Configuration Options

Parameter Type Default Description
log_file str "app.log" Target path for saving log output files.
write_to_file bool True Toggle writing log outputs to a file.
show_location bool True Toggle displaying [filename:line] location data.

License

Distributed under the Apache License 2.0. See the LICENSE file for details.

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

detaylog-1.0.1.tar.gz (2.6 kB view details)

Uploaded Source

Built Distribution

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

detaylog-1.0.1-py3-none-any.whl (2.8 kB view details)

Uploaded Python 3

File details

Details for the file detaylog-1.0.1.tar.gz.

File metadata

  • Download URL: detaylog-1.0.1.tar.gz
  • Upload date:
  • Size: 2.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.10

File hashes

Hashes for detaylog-1.0.1.tar.gz
Algorithm Hash digest
SHA256 deb1e65f559dddd1ea5d3dc047e296570bfb666291d73dc5579a58f8d88fec54
MD5 8d002d53f113e2b3c8d169c36b3c6110
BLAKE2b-256 d3dd4a3492519f4ea54c5b50d4c77525cec8c8b5cee1aebb27f446b27fd2129f

See more details on using hashes here.

File details

Details for the file detaylog-1.0.1-py3-none-any.whl.

File metadata

  • Download URL: detaylog-1.0.1-py3-none-any.whl
  • Upload date:
  • Size: 2.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.10

File hashes

Hashes for detaylog-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 d66ed0e080629f22fd90b2ea4c42e22069095d5d1c6e7f2ae5f21ccd32446cf1
MD5 ce6419bff4c37bb889eece0a4bd8b8fb
BLAKE2b-256 0d730368125a147efb682cb5df03420600758a8c81683902cc826359be8b48bf

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