Thursday, June 24, 2010

One-liner for errors per hour in a rolling log4j log

Because I keep forgetting valid syntax and having an example is very very handy:



for h in $(seq 0 23); do hh=$(printf "%02d" $h);  echo $hh $(grep "^2010-06-24 $hh.*general exception" some-dir?/ALogFile?.log* | wc -l); done;

2 comments:

Unknown said...

Sbobet Judi Bola Online Terpercaya Indonesia dan Kriterianya
Panduan Cara Daftar Bermain Taruhan Bola Sbobet Terpercaya
Beberapa Rahasia Cara Mendapatkan Bandar Judi Bola Sbobet
Permainan Joker123 Situs Judi Online Terbaru Dan Terpercaya

Gouse said...

Great breakdown on using Scala to analyze log4j logs efficiently! The one-liner approach to track errors per hour in a rolling log is super handy for quick insights and troubleshooting. A perfect example of how Scala's concise syntax can simplify complex tasks."
Digital Marketing Course In Ameerpet

Post a Comment