Skip to main content

Modern colorful logging library for Python

Project description

Fogger

Modern, colorful and fully customizable logging for Python.


Features

  • Zero dependencies
  • Beautiful terminal output
  • Fully customizable format system
  • Custom badge styles
  • ANSI color support
  • Lightweight and fast
  • Windows & Linux support
  • Clean developer experience

Installation

pip install fogger

Quick Example

from fogger import log


log.info("Starting development server...")
log.success("Database connected successfully")
log.warning("Memory usage is getting high")
log.error("Failed to authenticate user")
log.question("Do you want to continue?")
log.debug("Loaded environment variables")

Output

text
16:21:08  INFO     Starting development server...
16:21:08  SUCCESS  Database connected successfully
16:21:08  WARNING  Memory usage is getting high
16:21:08  ERROR    Failed to authenticate user
16:21:08  QUESTION Do you want to continue?
16:21:08  DEBUG    Loaded environment variables

Custom Formatting

Fogger allows you to fully customize log output.

from fogger import log

log.set_format("{badge}{message}")

log.success("Custom format enabled")

Output:

text
 SUCCESS  → Custom format enabled

Custom Badge Style

from fogger import log

log.set_badge_style("[ {label:^8} ]")

log.info("New badge style applied")

Output:

text
[   INFO   ] New badge style applied

Available Variables

Variable Description
{time} Current time
{badge} Colored badge
{level} Log level
{message} Log message

Log Types

log.info("Information")
log.success("Success")
log.warning("Warning")
log.error("Error")
log.question("Question")
log.debug("Debug")

Utilities

Line

log.line()

Space

log.space()

Example

from fogger import log


log.info("Server starting...")
log.success("API connected")

log.line()

log.set_format("{time} {badge}{message}")

log.warning("Custom formatting enabled")

Why Fogger?

  • Clean terminal aesthetics
  • Full customization
  • No dependencies
  • Fast & lightweight
  • Developer-friendly

Author

Made with love by 55e5

GitHub: https://github.com/qw97-alt


License

MIT

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

fogger-0.1.0.tar.gz (3.6 kB view details)

Uploaded Source

Built Distribution

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

fogger-0.1.0-py3-none-any.whl (4.0 kB view details)

Uploaded Python 3

File details

Details for the file fogger-0.1.0.tar.gz.

File metadata

  • Download URL: fogger-0.1.0.tar.gz
  • Upload date:
  • Size: 3.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.11

File hashes

Hashes for fogger-0.1.0.tar.gz
Algorithm Hash digest
SHA256 817285a3535aaa7d68ce720e0bf9038dede13958fcca7fdfb667c6d4371f1178
MD5 ed4f71a4c7af7a31d51a188ef2976145
BLAKE2b-256 78883d013b79406ba25b0f8e76fd3630cc24b734bf6b584d7fc82adc6ff76d8e

See more details on using hashes here.

File details

Details for the file fogger-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: fogger-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 4.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.11

File hashes

Hashes for fogger-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 1fa0b9146463f8471766bded7809f1a8d6d29770f2f0445ecdbe3e7b27be39ec
MD5 527890079919b93bda89dc8769722b09
BLAKE2b-256 c657c47d24ac0b3030444fb14479639758221aeab86b04b141ad41daf705503a

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