feat(GODT-2668): implemented new log retention policy.

This commit is contained in:
Xavier Michelon
2023-06-07 18:00:29 +02:00
parent 7a090ffcc9
commit c587dfc0dc
13 changed files with 617 additions and 205 deletions

View File

@ -81,7 +81,14 @@ func main() { //nolint:funlen
sessionID := logging.NewSessionID()
crashHandler.AddRecoveryAction(logging.DumpStackTrace(logsPath, sessionID, launcherName))
if err := logging.Init(logsPath, sessionID, launcherName, os.Getenv("VERBOSITY")); err != nil {
if err := logging.Init(
logsPath,
sessionID,
logging.LauncherShortAppName,
logging.DefaultMaxLogFileSize,
logging.NoPruning,
os.Getenv("VERBOSITY"),
); err != nil {
l.WithError(err).Fatal("Failed to setup logging")
}