Caddylog reads Caddy logfiles and displays relevant information about the logs
Find a file
2024-09-09 16:50:31 +02:00
src init 2024-09-09 16:50:31 +02:00
.gitignore init 2024-09-09 16:50:31 +02:00
Cargo.lock init 2024-09-09 16:50:31 +02:00
Cargo.toml init 2024-09-09 16:50:31 +02:00
README.md init 2024-09-09 16:50:31 +02:00

Caddylog

Caddylog reads Caddy logfiles and displays relevant information about the logs.

Usage

You pipe the log into caddylog and can optionally colorize it with tailspin:

tail -n20 -f access_log | caddylog | tspin

By default caddylog only reads in the JSON log format and prints each Log entry formatted as follows:

{LOG_LEVEL} {TIMESTAMP} {HOST} {METHOD} {PATH} {STATUS} {MSG} {PROTOCOL} {CLIENT_IP} {USER_AGENT}

You can filter out certain entries:

# Show only requests with unique User Agent
caddylog --unique ua

# Show only requests with unique IP
caddylog --unique ip

# Filter requests based on host
caddylog --host host

# Filter out 200 OK requests
caddylog --failed

Print only the unique values without full log entry:

caddylog --unique <unique> --value

Caddylog also has graph visualizations:

  • Show number of requests per host
caddylog --stat host
  • Show number of request per Geo location
caddylog --stat geo
  • Show number of requests over time
caddylog --stat time
  • Show how long requests take
caddylog --stat latency