logrus: add deployment channel as field to the logs
This commit is contained in:
parent
2da3a73308
commit
9006836afc
5 changed files with 80 additions and 11 deletions
|
|
@ -110,6 +110,10 @@ func main() {
|
|||
logrus.Warn("GLITCHTIP_DSN not configured, skipping initializing Sentry/Glitchtip")
|
||||
}
|
||||
|
||||
if config.DeploymentChannel != "" {
|
||||
logrus.AddHook(&common.EnvironmentHook{Channel: config.DeploymentChannel})
|
||||
}
|
||||
|
||||
stateDir, ok := os.LookupEnv("STATE_DIRECTORY")
|
||||
if !ok {
|
||||
logrus.Fatal("STATE_DIRECTORY is not set. Is the service file missing StateDirectory=?")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue