🎨 chromalogger
Um logger colorido, contextual e super fácil de usar para Python.
Ideal para dar aquele toque profissional e visual no terminal, com timestamps configuráveis e logs gravados em arquivo.
🚀 Instalação
pip install git+https://github.com/GussApenas/chromalogger
💡 Por que usar chromalogger?
- Logs coloridos e fáceis de ler no terminal
- Timestamp configurável (padrão para horário do Brasil UTC−3)
- Suporte a contexto (dicionários, objetos JSON)
- Fácil gravação de logs em arquivo
- Métodos intuitivos:
info(),warn(),error(),debug(),success()
🧰 Como usar
from chromalogger import log
# Log simples com timestamp padrão (Brasil UTC-3)
log.info("Servidor iniciado")
# Log com contexto JSON
log.warn("Uso alto de CPU", context={"cpu": "92%"})
# Log com timestamp em UTC
log.debug("Debug em UTC", timezone=0)
# Log sem timestamp e sem cores
log.error("Erro crítico sem timestamp e sem cores", timestamp=False, colors=False)
# Grava log diretamente em arquivo (sem cores, timestamp padrão)
log.to_file("Mensagem salva no arquivo", file="logs/app.log", level="INFO")
⚙️ Parâmetros por método
| Parâmetro | Tipo | Padrão | Descrição |
|---|---|---|---|
msg |
str |
— | Mensagem a ser logada |
context |
dict |
None |
Informações adicionais (mostradas em JSON no log) |
timestamp |
bool |
True |
Mostrar timestamp no log |
colors |
bool |
True |
Usar cores no terminal |
timezone |
int |
-3 |
Offset de fuso horário para timestamp (ex: -3 = BR) |
📚 Métodos disponíveis
| Método | Descrição |
|---|---|
log.info() |
Informações gerais |
log.warn() |
Avisos |
log.error() |
Erros críticos |
log.debug() |
Mensagens de depuração |
log.success() |
Mensagens de sucesso |
log.to_file() |
Grava mensagens direto em arquivo |
🤝 Contribua!
Quer ajudar a melhorar o chromalogger?
Sinta-se à vontade para abrir issues e pull requests no GitHub!
Desenvolvido com 💜 por Guss
Metadata
Release files for chromalogger 1.0.0
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 |
|---|---|---|---|---|
| chromalogger-1.0.0.tar.gz | 4.7 kB | Without provenance | Details for chromalogger-1.0.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| chromalogger-1.0.0-py3-none-any.whl | Python 3 | none | any | Details for chromalogger-1.0.0-py3-none-any.whl |
Total release size: 10.0 kB
Release files / chromalogger-1.0.0.tar.gz
| Download URL | chromalogger-1.0.0.tar.gz |
|---|---|
| Size | 4.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
b72415734537a44dfc5d87a4ff54e7fd8ef586e9bee44f2df63b3f09316dd482
|
|
BLAKE2b-256 checksum How to use checksums |
4e10010dc86dee1435f67af486fcaa2d8466de72c54d1db115e470601c072434
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.12.11
|
Release files / chromalogger-1.0.0-py3-none-any.whl
| Download URL | chromalogger-1.0.0-py3-none-any.whl |
|---|---|
| Size | 5.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
35979a2589a557f2ab9e0915ca0fbcff37f28e881caa426e696c335dfd5ac617
|
|
BLAKE2b-256 checksum How to use checksums |
2eafad778b3f33bf3d0988bbd7bae924e147ca940922f35684879251d24d8f06
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.12.11
|
Security for chromalogger 1.0.0
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.