filter log file by defining regexes
Posted
by fmpdmb
on Stack Overflow
See other posts from Stack Overflow
or by fmpdmb
Published on 2010-03-17T17:26:09Z
Indexed on
2010/03/17
17:31 UTC
Read the original article
Hit count: 224
I have some HUGE log files (50Mb; ~500K lines) I need to start filtering some of the crap out of. The log files are being produced using log4j and have the basic pattern of:
[log-level] date-time class etc, etc
log-message
I'm looking for a way that I can identify a regex start and regex end (or something similar) that will filter out the matching entries from the file so I can more easily wade through these massive files. I'm sure I could write a java program to accomplish this task, but I thought I'd ask the community before going down that path. Thanks in advance.
© Stack Overflow or respective owner