Skip to content

atwinbrizkovski/logdrift

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

logdrift

Tail and diff structured JSON logs across multiple services in real time.


Installation

go install github.com/yourusername/logdrift@latest

Or build from source:

git clone https://github.com/yourusername/logdrift.git
cd logdrift
go build -o logdrift .

Usage

Tail logs from multiple services and highlight structural differences as they arrive:

logdrift --services auth-service,payment-service --field level,message,trace_id

Pipe from log files or streams:

logdrift --input ./logs/auth.log ./logs/payment.log --diff-keys timestamp,error

Example output:

[auth-service]     {"level":"error","message":"token expired","trace_id":"abc123"}
[payment-service]  {"level":"info","message":"charge processed","trace_id":"abc123"}
                   ^^^ DRIFT: level mismatch — error vs info

Flags

Flag Description
--services Comma-separated list of service names to tail
--input One or more log file paths to read from
--field JSON fields to compare across services
--follow Keep tailing as new log lines arrive (default: true)
--format Output format: pretty, json, or compact

Requirements

  • Go 1.21+
  • Services must emit newline-delimited JSON logs

License

MIT © 2024 yourusername

About

A CLI tool that tails and diffs structured JSON logs across multiple services in real time.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages