surtur
9ac8810f67
All checks were successful
continuous-integration/drone/push Build is passing
* init in run.go * use slogger instead of slog in main * print different messages based on whether we're initialising or re-initialising slogger..
24 lines
369 B
Go
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)
|
|
}
|
|
}
|