applog
A beautiful, zero-dependency logging formatter for Python with colors, emoji support, clickable file links, and intelligent number highlighting.
Features
- 🎨 Colored output by log level (respects
NO_COLORandFORCE_COLORstandards) - 😊 Smart emoji support - clean emoji-only output with automatic fallback for incompatible terminals
- 🔗 Clickable file links (OSC 8 hyperlinks) - Ctrl+Click to open in your editor
- 🔢 Automatic number highlighting - numbers stand out in your logs
- 📦 Zero external dependencies - pure Python standard library
- 🚀 No pre-rendering - logs wrap correctly when terminal resizes
- ⚙️ Environment variable aware - follows
NO_COLOR,FORCE_COLOR,NO_EMOJI,FORCE_EMOJIconventions
Installation
uv add applog
Quick Start
from applog import logger
logger.debug("Debug message")
logger.info("Info message")
logger.warning("Warning message")
logger.error("Error message")
logger.critical("Critical message")
With colors and emojis (default on supported terminals):
Thu 12:42:25 🐛 <module>: Debug message
Thu 12:42:26 ℹ️ <module>: Info message
Thu 12:42:26 ⚠️ <module>: Warning message
Thu 12:42:26 ❌ <module>: Error message
Thu 12:42:26 🔥 <module>: Critical message
Without color/emoji support (automatic fallback):
Thu 12:42:25 DBG <module>: Debug message
Thu 12:42:26 INF <module>: Info message
Thu 12:42:26 WRN <module>: Warning message
Thu 12:42:26 ERR <module>: Error message
Thu 12:42:26 CRT <module>: Critical message
Changing Date Format
from applog import root_logger
# Change to 24-hour time without seconds
root_logger.handlers[0].formatter.datefmt = '%H:%M'
# Change to full datetime
root_logger.handlers[0].formatter.datefmt = '%Y-%m-%d %H:%M:%S'
Customizing Colors
from applog import Color, root_logger
# Modify color codes (ANSI escape sequences)
Color.INFO = '\033[94m' # Bright blue for INFO
Customizing Emojis
from applog import logging, root_logger
# Modify emoji mapping (access via formatter)
formatter = root_logger.handlers[0].formatter
if hasattr(formatter, 'LEVEL_EMOJIS'):
formatter.LEVEL_EMOJIS['INFO'] = '📘' # Change INFO emoji
formatter.LEVEL_EMOJIS['CRITICAL'] = '💀' # Change CRITICAL emoji
Environment Variables
| Variable | Effect |
|---|---|
NO_COLOR |
Disable all colored output |
FORCE_COLOR |
Force colored output even in non-TTY |
NO_EMOJI |
Disable emoji output (uses text fallback) |
FORCE_EMOJI |
Force emoji output even in non-TTY |
Example:
# Disable emoji output
NO_EMOJI=1 python myapp.py
# Force emoji even when logging to a file
FORCE_EMOJI=1 python myapp.py > output.log
Terminal Support
Emoji support is automatically detected and works on:
- ✅ VS Code integrated terminal
- ✅ Windows Terminal
- ✅ macOS Terminal.app and iTerm2
- ✅ Modern Linux terminals (GNOME Terminal, Konsole, etc.)
Fallback to text labels occurs automatically on:
- Legacy Windows terminals (CMD, PowerShell classic)
- Linux TTY consoles (no emoji fonts)
Using with Standard Logging
applog configures the root logger, so any standard logging calls will use the same formatting:
import logging
from applog import logger
# These will all have the same beautiful formatting
logging.warning("Root logger warning")
custom_logger = logging.getLogger(__name__)
custom_logger.info("Custom logger info")
Advanced Usage
Adding Handlers
from applog import root_logger
import logging
# Add file handler
file_handler = logging.FileHandler('app.log')
file_handler.setFormatter(logging.Formatter('%(asctime)s - %(levelname)s - %(message)s'))
root_logger.addHandler(file_handler)
Creating Child Loggers
from applog import logger
module_logger = logger.getChild('module_name')
module_logger.info("This will inherit parent settings")
Notes
- For end-user applications only: Only use this library in end-user applications. Libraries should normally only call standard
logging.getLogger(__name__)and not mess with formatting - let the final application control the formatting. - Terminal-only: This formatter is specifically for console output.
- The module configures the root logger on import - import it early in your application.
- Hyperlinks use OSC 8 sequences - won't work in very old terminals
Why applog?
- vs rich.logging: Logs adapt when you resize your terminal (no pre-rendering)
- vs loguru: Works with all standard
loggingcalls out of the box - The result: Beautiful, clickable, dependency-free logging with emoji support that just works
Metadata
Release files for applog 1.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| applog-1.0.1.tar.gz | 4.7 kB | Without provenance | Details for applog-1.0.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| applog-1.0.1-py3-none-any.whl | Python 3 | none | any | Details for applog-1.0.1-py3-none-any.whl |
Total release size: 9.7 kB
Release files / applog-1.0.1.tar.gz
| Download URL | applog-1.0.1.tar.gz |
|---|---|
| Size | 4.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
d8d43cf6de514165b59da1a4c9cd5bb4a660b4bcc54139f8eb5b30d4dcb5df78
|
|
BLAKE2b-256 checksum How to use checksums |
de8e88291ca7ea7174e9e71f1c365158f1945766580539ff359a6099537dbaa0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.11.17 {"installer":{"name":"uv","version":"0.11.17","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Release files / applog-1.0.1-py3-none-any.whl
| Download URL | applog-1.0.1-py3-none-any.whl |
|---|---|
| Size | 5.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
d5bb10e299bce7d54d94a66efa1c301373d6b47480a011f0a843ddf23541f55c
|
|
BLAKE2b-256 checksum How to use checksums |
04e66404090a8ca2cf294ad77c3c549b8514b72ca19773645981adb712bd7b35
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.11.17 {"installer":{"name":"uv","version":"0.11.17","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Security for applog 1.0.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.