Browse Source

新增config new

1 1 month ago
parent
commit
e1e67898bb
2 changed files with 32 additions and 0 deletions
  1. 8 0
      .idea/.gitignore
  2. 24 0
      logger/init.go

+ 8 - 0
.idea/.gitignore

@@ -0,0 +1,8 @@
+# 默认忽略的文件
+/shelf/
+/workspace.xml
+# 基于编辑器的 HTTP 客户端请求
+/httpRequests/
+# Datasource local storage ignored files
+/dataSources/
+/dataSources.local.xml

+ 24 - 0
logger/init.go

@@ -0,0 +1,24 @@
+package logger
+
+import "git.listensoft.net/tool/jspkit/config"
+
+func NewConfig() (cfg config.System) {
+	return config.System{
+		Logger: config.Logger{
+			Level:      "debug",
+			Filename:   "log.log",
+			MaxSize:    10,
+			MaxBackups: 10,
+			MaxAge:     10,
+			Compress:   true,
+			Console:    true,
+			ToMq:       true,
+			MqSetting: config.MqSetting{
+				Host:     "localhost",
+				Port:     5672,
+				Username: "guest",
+				Password: "guest",
+			},
+		},
+	}
+}