implement CBA macros, fix for prod

- using a3go 0.3.2, no longer relies on ext callback for anything except RPT logging and waiting DB connect at postinit
- tested and functional
This commit is contained in:
2023-10-12 15:41:22 -07:00
parent 62fbe8b24c
commit 6cf76d1019
29 changed files with 487 additions and 452 deletions

View File

@@ -52,9 +52,9 @@ func InitLoggers(o *LoggerOptionsType) {
ll = &lumberjack.Logger{
Filename: ActiveOptions.Path,
MaxSize: 5,
MaxBackups: 10,
MaxBackups: 8,
MaxAge: 14,
Compress: true,
Compress: false,
LocalTime: true,
}
@@ -66,7 +66,7 @@ func InitLoggers(o *LoggerOptionsType) {
armaLogFormatLevel := func(i interface{}) string {
return strings.ToUpper(
fmt.Sprintf(
"(%s)",
"%s:",
i,
))
}
@@ -117,13 +117,17 @@ func InitLoggers(o *LoggerOptionsType) {
NoColor: true,
FormatTimestamp: armaLogFormatTimestamp,
FormatLevel: armaLogFormatLevel,
FieldsExclude: []string{zerolog.CallerFieldName, "ctx"},
},
)).With().Timestamp().Logger()
)).With().Timestamp().Caller().Logger()
if ActiveOptions.Debug {
Log = Log.Level(zerolog.DebugLevel)
} else {
Log = Log.Level(zerolog.InfoLevel)
}
if ActiveOptions.Trace {
Log = Log.Level(zerolog.TraceLevel)
}
}