Complete and optimized configuration file for Logalize - fast and extensible log colorizer
This repository contains a complete, tested, and functional configuration file for Logalize, including:
- ✅ 15+ predefined log formats
- ✅ 40+ detection patterns (IPs, URLs, timestamps, etc)
- ✅ 100+ categorized words (success, error, warning, etc)
- ✅ 6 ready-to-use color themes
- ✅ Fully documented with comments in Portuguese
# Clone this repository
git clone https://github.com/fgbona/logalize.git
cd logalize
# Copy configuration to the correct location
mkdir -p ~/.config/logalize
cp logalize.yaml ~/.config/logalize/
# Or use global configuration
sudo mkdir -p /etc/logalize
sudo cp logalize.yaml /etc/logalize/# Test with your logs
tail -f /var/log/syslog | logalize
cat /var/log/nginx/access.log | logalize
journalctl -f | logalizePredefined formats for structured logs:
- Apache/Nginx - Access logs in combined format
- Syslog - Standard system format
- Systemd Journal - Systemd logs
- Docker Compose - Container logs
- Kubernetes - Pod and container logs
- Spring Boot - Java application logs
- Python/Django - Python application logs
- PostgreSQL - Database logs
- MySQL/MariaDB - Database logs
- Nginx Error - Nginx error logs
- Redis - Redis logs
- Logfmt - Format used by Prometheus/Grafana
Patterns detected anywhere in the line:
- ✅ IPv4 (with and without port)
- ✅ IPv6
- ✅ URLs (http/https)
- ✅ Domains
- ✅ Emails
- ✅ ISO8601 (2024-01-10T14:23:45.123Z)
- ✅ Slash date format (2024/01/10)
- ✅ Dash date format (2024-01-10)
- ✅ 24h time (14:23:45.123)
- ✅ Unix timestamp
- ✅ UUID (8-4-4-4-12)
- ✅ GUID ({8-4-4-4-12})
- ✅ MD5 hash (32 hex characters)
- ✅ SHA1 hash (40 hex characters)
- ✅ SHA256 hash (64 hex characters)
- ✅ HTTP methods (GET, POST, PUT, etc)
- ✅ Status codes (200, 404, 500, etc)
- ✅ Unix paths (/var/log/syslog)
- ✅ Windows paths (C:\Windows\System32)
- ✅ File extensions (.log, .txt)
- ✅ Integers
- ✅ Decimals
- ✅ Hexadecimals (0xFF)
- ✅ Percentages (85%)
- ✅ Memory sizes (1.5GB, 256MB)
- ✅ Strings ("text" or 'text')
- ✅ Log levels (DEBUG, INFO, WARN, ERROR)
- ✅ JSON keys ("key":)
- ✅ Variable assignments (var=)
- ✅ Function calls (func())
- ✅ SQL keywords
- ✅ Container IDs
- ✅ Kubernetes namespaces
- ✅ JWT tokens
- ✅ API keys
Logalize automatically detects words and their inflected forms:
- accept, active, allow, authenticate, authorized
- complete, connect, enabled, established, granted
- healthy, initialize, listening, loaded, mounted
- online, ready, running, success, valid, verified
- And 30+ more words...
- abort, block, broken, cancel, crash, critical
- dead, denied, disconnect, error, fail, fatal
- forbidden, invalid, kill, panic, refuse, reject
- stop, terminate, timeout, unauthorized, unstable
- And 40+ more words...
- create, delete, deploy, execute, install
- load, migrate, process, restart, update, upgrade
- docker, kubernetes, k8s, redis, postgres
- nginx, apache, elasticsearch, kafka, mongodb
- aws, azure, gcp, github, gitlab
- Add your own words here!
Professional themes ready to use:
-
TokyoNight Dark ⭐ (Default)
- Modern and elegant
- Great contrast
- Easy on the eyes
-
Catppuccin Mocha ☕
- Soft and comfortable palette
- Pastel colors
- Very popular
-
Nord ❄️
- Minimalist polar theme
- Cool colors
- Scandinavian design
-
Dracula 🧛
- Popular dark theme
- High contrast
- Vibrant colors
-
Gruvbox Dark 🎨
- Retro theme
- Warm colors
- Comfortable for long sessions
-
Solarized Dark 🌅
- Classic solarized design
- Scientifically balanced
- Harmonious colors
# Real-time syslog
tail -f /var/log/syslog | logalize
# Journalctl
journalctl -f | logalize
journalctl -u nginx.service -f | logalize
journalctl -xe | logalize# Apache
tail -f /var/log/apache2/access.log | logalize
tail -f /var/log/apache2/error.log | logalize
# Nginx
tail -f /var/log/nginx/access.log | logalize
tail -f /var/log/nginx/error.log | logalize# PostgreSQL
tail -f /var/log/postgresql/postgresql-14-main.log | logalize
# MySQL
tail -f /var/log/mysql/error.log | logalize
# Redis
tail -f /var/log/redis/redis-server.log | logalize# Docker
docker logs -f container-name 2>&1 | logalize
docker-compose logs -f | logalize
# Kubernetes
kubectl logs -f deployment/myapp | logalize
kubectl logs -f -l app=myapp --all-containers=true | logalize
kubectl logs -f pod/myapp-pod -c container-name | logalize# Spring Boot / Java
tail -f application.log | logalize
java -jar app.jar | logalize
# Python / Django
tail -f django.log | logalize
python manage.py runserver 2>&1 | logalize
# General application logs
tail -f /var/log/myapp/app.log | logalize# Use Dracula theme
cat logs.txt | logalize -t dracula
# Use Nord theme
tail -f /var/log/syslog | logalize -t nord
# Use Gruvbox theme
journalctl -f | logalize -t gruvbox-dark# Read complete file
cat /var/log/syslog | logalize
# Last 100 lines
tail -n 100 /var/log/nginx/access.log | logalize
# Search and colorize
grep "error" /var/log/syslog | logalize# View all available themes
logalize -T
logalize --list-themes# Specify configuration file
cat logs.txt | logalize -c /path/to/logalize.yaml
cat logs.txt | logalize --config custom-config.yaml# Use only formats (ignore patterns and words)
cat logs.txt | logalize --only-formats
# Use only patterns
cat logs.txt | logalize --only-patterns
# Use only words
cat logs.txt | logalize --only-words
# Disable all builtins
cat logs.txt | logalize -N
cat logs.txt | logalize --no-builtins# Debug mode (see what's being applied)
cat logs.txt | logalize --debug
# Dry-run (process without coloring)
cat logs.txt | logalize --dry-runEdit the logalize.yaml file and add your words in the words.custom section:
words:
custom:
- "my-application"
- "my-service"
- "special-word"
- "company-xyz"Add a new format in the formats section:
formats:
my-format:
- regexp: "(\\d{4}-\\d{2}-\\d{2} )"
name: date
- regexp: "([A-Z]+) "
name: level
- regexp: "\\[([^\\]]+)\\] "
name: module
- regexp: "(.*)"
name: messageModify colors in hexadecimal (#RRGGBB) or ANSI (0-255):
themes:
tokyonight-dark:
patterns:
ipv4-address:
fg: "#ff0000" # red
bg: "#000000" # black background
style: bold # boldbold- boldfaint- faintitalic- italicunderline- underlineoverline- overlinecrossout- strikethroughreverse- reverse foreground/background colorspatterns- apply color patternswords- apply word coloringpatterns-and-words- apply both
settings: # General settings
theme: "..." # Default theme
debug: false # Debug mode
# ... other options
formats: # Complete log formats
apache-access-log:
- regexp: "..."
name: "..."
# ... more formats
patterns: # Detection patterns
ipv4-address:
priority: 100
regexp: "..."
# ... more patterns
words: # Categorized words
good:
- "success"
- "complete"
bad:
- "error"
- "fail"
# ... more categories
themes: # Color themes
tokyonight-dark:
default:
fg: "..."
patterns:
# ... pattern colors
words:
# ... word colors
# ... more themes# Check if YAML is valid
python3 -c "import yaml; yaml.safe_load(open('logalize.yaml'))"# Check if file is being found
logalize --debug < file.log
# Test with formats only
logalize --only-formats < file.log
# Test with patterns only
logalize --only-patterns < file.log# Check color support
echo $TERM
# Force colored output
export FORCE_COLOR=1
cat logs.txt | logalizeLogalize searches for configurations in this order:
/etc/logalize/logalize.yaml~/.config/logalize/logalize.yaml.logalize.yaml(in current directory)- Path specified with
-c/--config
# Use specific path
logalize -c /full/path/to/logalize.yaml < logs.txtFor very large logs, use --only-formats for better performance:
tail -f huge.log | logalize --only-formats# Combine with grep
grep "error" /var/log/syslog | logalize
# Combine with awk
awk '/failed/' /var/log/auth.log | logalize
# Combine with sed
sed -n '100,200p' app.log | logalize# Save with ANSI colors
tail -f /var/log/syslog | logalize > colored.log
# View later with less (preserves colors)
less -R colored.log# Colorize multiple files
cat /var/log/syslog /var/log/auth.log | logalize
# All logs in a directory
cat /var/log/*.log | logalize# With terminal title update
watch -c "tail -n 50 /var/log/syslog | logalize"
# Multiple terminals with tmux/screen
tmux split-window "tail -f /var/log/nginx/access.log | logalize"- Original Project: deponian/logalize
- Documentation: Official README
- Issues: Report problems
Found a bug or have a suggestion? Feel free to:
- Open an Issue
- Submit a Pull Request
- Share your custom configurations
This configuration file is under the MIT license. The original Logalize also uses the MIT license.
Need help?
- 📖 Read the official documentation
- 🐛 Report bugs in Issues
- 💬 Discussions in the community
Made with ❤️ for the Logalize community
⭐ If this repository was useful, leave a star!