Skip to content
/ lognile Public

Golang实现的轻量级文件日志采集工具

License

Notifications You must be signed in to change notification settings

boyxp/lognile

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

51 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Lognile

Golang实现的轻量级文件日志采集工具

快速上手

创建配置文件config.yaml

#要监听的日志路径
pattern :
    - ./_log/php-fpm-*.log
    - ./_log/nginx-*.log

#日志进度存储文件
db : lognile.db

启动程序加载配置,即可监听对应文件的日志新记录,新日志自动回调

package main

import "log"
import "github.com/boyxp/lognile"

func main() {
	lognile.Init("config.yaml", func(row map[string]string) {
		log.Println(row)
	})
}

About

Golang实现的轻量级文件日志采集工具

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages