pcmt/main.go
surtur 9ac8810f67
All checks were successful
continuous-integration/drone/push Build is passing
go: change how logger is initialised
* init in run.go
* use slogger instead of slog in main
* print different messages based on whether we're initialising or
  re-initialising slogger..
2023-08-02 15:26:51 +02:00

24 lines
369 B
Go

// Copyright 2023 wanderer <a_mirre at utb dot cz>
// SPDX-License-Identifier: AGPL-3.0-only
package main
import (
"os"
"git.dotya.ml/mirre-mt/pcmt/slogging"
)
func main() {
err := run()
if err != nil {
l := slogging.Logger()
if l == nil {
l = slogging.Init(true)
}
l.Error("unrecoverable failure, stopping the app", "error", err)
os.Exit(1)
}
}