package main import ( "plc-recorder/config" "plc-recorder/logger" "plc-recorder/nsqclient" "github.com/rs/zerolog" ) func main() { // 初始化配置 config.Load() // 初始化zerolog, 主要是避免plc4go打印无关的日志 zerolog.SetGlobalLevel(zerolog.FatalLevel) // 初始化日志 logger.InitLog("./log/plc-recorder.log", "debug", 15, false) logger.Info("plc-recorde start!") // 初始化nsq nsqclient.InitNsqProducer() select {} }