Skip to content

This script takes a log file as input, removes lines that match a pattern, and then creates a new file that includes only lines that match a second pattern.

License

Notifications You must be signed in to change notification settings

crlamke/logreducer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 

Repository files navigation

logreducer

Usage: logreducer target-file line-removal-pattern line-inclusion-pattern

Example: logreducer ./log.txt "success" "error"

This script takes a log file as input, removes lines that match a pattern, and then creates a new file that includes only lines that match a second pattern plus a buffer of lines before and after the matching line. The goal is to reduce the lines in a log file to only those relevant for review or troubleshooting.

About

This script takes a log file as input, removes lines that match a pattern, and then creates a new file that includes only lines that match a second pattern.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages