完成日志输出到文件、终端多处的处理
This commit is contained in:
@@ -1,13 +1,6 @@
|
||||
package config
|
||||
|
||||
type config struct {
|
||||
Location string
|
||||
Point int
|
||||
Relay string
|
||||
Mqtt MqttConfig
|
||||
Aliyun AliyunConfig
|
||||
Game GameConfig
|
||||
}
|
||||
import "gopkg.in/natefinch/lumberjack.v2"
|
||||
|
||||
type MqttConfig struct {
|
||||
Url string
|
||||
@@ -24,4 +17,19 @@ type GameConfig struct {
|
||||
MaxTimeout int
|
||||
}
|
||||
|
||||
type Logger struct {
|
||||
File *lumberjack.Logger
|
||||
Level string
|
||||
}
|
||||
|
||||
type config struct {
|
||||
Location string
|
||||
Point int
|
||||
Relay string
|
||||
Log Logger
|
||||
Mqtt MqttConfig
|
||||
Aliyun AliyunConfig
|
||||
Game GameConfig
|
||||
}
|
||||
|
||||
var C config
|
||||
|
||||
Reference in New Issue
Block a user