Lognile
Lightweight File Log Collection Tool for Golang

Lognile is a lightweight log collection tool implemented in Go. It allows you to monitor log files and automatically handle new log entries.
Quick Start
-
Create a Configuration File:
Create a file named config.yaml with the following content:
# Paths to the log files to monitor
pattern:
- ./_log/php-fpm-*.log
- ./_log/nginx-*.log
# File to store log progress
db: lognile.db
-
Create a Basic Application:
Create a file named main.go with the following content to use Lognile:
package main
import (
"log"
"github.com/boyxp/lognile"
)
func main() {
// Initialize Lognile with the configuration file
lognile.Init("config.yaml", func(row map[string]string) {
// Handle new log entries
log.Println(row)
})
}
-
Run the Application:
Use the following command to run your application:
go run main.go
Explanation
Running the Application
- Start Monitoring: Once the application runs, it will start monitoring the specified log files for new entries.
- Handle Log Entries: New log entries will be passed to the callback function, where you can process them as needed.
Demo
Please see the demo for a demonstration of its actual performance.