Skip to main content

🎨 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


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)

Source distribution for chromalogger 1.0.0
File Size Uploaded
chromalogger-1.0.0.tar.gz 4.7 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for chromalogger 1.0.0
File Interpreter ABI Platform
chromalogger-1.0.0-py3-none-any.whl Python 3 none any Details

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

Release history Release notifications | RSS feed

This release

1.0.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page