diff --git a/bin/node/server.go b/bin/node/server.go index b1a8693..67d2c5a 100644 --- a/bin/node/server.go +++ b/bin/node/server.go @@ -27,6 +27,7 @@ func main() { lcf := zap.NewDevelopmentConfig() lcf.Level.SetLevel(zapcore.Level(*level)) lcf.Development = false + lcf.DisableStacktrace = true logger, err := lcf.Build(zap.AddCallerSkip(1)) if err != nil { slog.Fatalln("new log err:", err.Error()) diff --git a/conf/conf.go b/conf/conf.go index 107b07a..43e7652 100644 --- a/conf/conf.go +++ b/conf/conf.go @@ -159,7 +159,8 @@ func (c *Conf) UUID() (string, error) { if len(b) == 0 { return c.genUUID() } - return string(b), nil + suid := strings.Join(strings.Fields(string(b)), "") + return suid, nil } if !os.IsNotExist(err) { diff --git a/conf/files/base.json.sample b/conf/files/base.json.sample index c7b74d3..e452970 100644 --- a/conf/files/base.json.sample +++ b/conf/files/base.json.sample @@ -24,6 +24,6 @@ "Security": "@extend:security.json", "#comment": "PIDFile and UUIDFile just work for cronnode", "#PIDFile": "Given a none-empty string to write a pid file to the specialed path, or leave it empty to do nothing", - "PIDFile": "/tmp/cronsun/cronnode_pid", + "PIDFile": "/var/run/cronsun/cronnode.pid", "UUIDFile": "/etc/cronsun/CRONSUN_UUID" } diff --git a/conf/files/db.json.sample b/conf/files/db.json.sample index 327d72c..f7d63bb 100644 --- a/conf/files/db.json.sample +++ b/conf/files/db.json.sample @@ -3,6 +3,8 @@ "127.0.0.1:27017" ], "Database": "cronsun", + "UserName": "", + "Password": "", "#Timeout": "connect timeout duration/second", "Timeout": 15 } diff --git a/conf/files/web.json.sample b/conf/files/web.json.sample index 9a97e63..d378ab4 100644 --- a/conf/files/web.json.sample +++ b/conf/files/web.json.sample @@ -1,11 +1,12 @@ { "BindAddr": ":7079", "Auth": { + "#Enabled": "set to true to open auth. default username and password is admin@admin.com/admin", "Enabled": false }, "Session": { "StorePrefixPath": "/cronsun/sess/", - "CookieName": "uid", + "CookieName": "cronsun_uid", "Expiration": 8640000 }, "#comment": "Delete the expired log (which store in mongodb) periodically",