A fast and efficient log parser written in Go that scans multiple log files simultaneously, extracts lines that start with ERROR, and writes them to a specified output file. Designed with performance and concurrency in mind.
- ๐๏ธ Parses multiple log files at once.
- ๐จ Filters lines that start with
ERROR. - ๐ Writes the results to a specified output file.
- ๐งต Uses concurrent goroutines for parallel processing.
- ๐ง Employs RWMutex to ensure thread-safe access to shared channels.
- ๐ง Reads and writes using buffers with a max size of 1MB to keep memory usage under control โ even for large log files.
-
Build the binary:
go build -o logprocessor main.go