// call func when on rpc client connected with a log client goroutine
call func when on rpc client connected with a log client goroutine
// call func when on rpc client connected with a log client goroutine
func (c *LogClient) eventHandler(e fsnotify.Event) {
	if e.Op&fsnotify.Write == fsnotify.Write {
		line, err := utils.ReadLastLine(e.Name)
		if err != nil {
			_logger.Errorf("read line got error: .\n", err)
		}
		_logger.Infof("LoggingEvent. modified file: %s. last line: %s", e.Name, strings.TrimSpace(line))
	}
}
func ( c * LogClient ) eventHandler ( e fsnotify . Event ) { if e . Op & fsnotify . Write == fsnotify . Write { line , err := utils . ReadLastLine ( e . Name ) if err != nil { _logger . Errorf ( " \n " , err ) } _logger . Infof ( " " , e . Name , strings . TrimSpace ( line ) ) } }
call func when on rpc client connected with a log client goroutine
call func when on rpc client connected with a log client goroutine
// base the line parse result to deal with other handler // wg.Add() should be written in parent goroutine