Categorygithub.com/lovego/logc
modulepackage
0.0.4
Repository: https://github.com/lovego/logc.git
Documentation: pkg.go.dev

# README

Logc

A log collector(like logstash, fluentd) written by golang. Now only support read from files and output to elasticSearch.

Build Status Coverage Status Go Report Card Documentation

Install

go get github.com/lovego/logc

Usage

logc <your_logc_config_file.yml>

See logc.yml for full config format.

# Packages

No description provided by the author
No description provided by the author
No description provided by the author
Package watch 监听文件变动,并通知相应的日志收集器。 如果在收集日志过程中,文件被移动,因为fsnotify是基于文件名来识别文件的,就监听不到该文件的写变动。 既然fsnotify做不到文件移动后继续监听, 所以我们就只监听文件所在的目录,来获取文件的写入和创建事件。 在我们检测到文件移动后,我们将收集器映射到新的文件名。 我们只关心3种变动事件: 1.