package logger

import "git.listensoft.net/tool/jspkit/config"

// NewConfig 创建调试/生产日志配置
func NewConfig() (cfg config.System) {
	return config.System{
		Logger: config.Logger{
			Level:      "info",
			Filename:   "log.log",
			MaxSize:    10,
			MaxBackups: 5000,
			MaxAge:     365,
			Compress:   true,
			Console:    true,
			ToMq:       true,
			MqSetting: config.MqSetting{
				Host:     "localhost",
				Port:     5672,
				Username: "guest",
				Password: "guest",
			},
		},
	}
}

// NewTestConfig 创建测试日志配置
func NewTestConfig() config.System {
	// TODO: 不写文件，只输出到控制台
	return config.System{
		Logger: config.Logger{
			Level:      "debug",
			Filename:   "log.log",
			MaxSize:    10,
			MaxBackups: 10,
			MaxAge:     10,
			Compress:   false,
			Console:    true,
			ToMq:       false,
		},
	}
}
