From 97777d19a626c9607c92945dc1461e8fc7fa6ebb Mon Sep 17 00:00:00 2001 From: johnabass Date: Tue, 19 Nov 2024 18:16:07 -0800 Subject: [PATCH] fixed the logging configuration --- devMode.go | 6 +++++- main.go | 8 ++++---- themis.yaml | 6 +++++- 3 files changed, 14 insertions(+), 6 deletions(-) diff --git a/devMode.go b/devMode.go index 36cf6d8..d1e3a4e 100644 --- a/devMode.go +++ b/devMode.go @@ -115,7 +115,11 @@ token: bits: 1024 log: - file: stdout + outputPaths: + - stdout + errorOutputPaths: + - stderr level: DEBUG + encoding: json ` ) diff --git a/main.go b/main.go index bceb234..976c3a0 100644 --- a/main.go +++ b/main.go @@ -88,6 +88,10 @@ func main() { provideMetrics(), fx.Provide( config.ProvideViper(setupViper), + func(u config.Unmarshaller) (c sallust.Config, err error) { + err = u.UnmarshalKey("log", &c) + return + }, xhealth.Unmarshal("health"), random.Provide, key.Provide, @@ -112,10 +116,6 @@ func main() { config.ApplicationName = applicationName return config, nil }, - func(u config.Unmarshaller) (c sallust.Config, err error) { - err = u.UnmarshalKey("log", &c) - return - }, ), fx.Invoke( xhealth.ApplyChecks( diff --git a/themis.yaml b/themis.yaml index 254e88d..e1f069f 100644 --- a/themis.yaml +++ b/themis.yaml @@ -108,8 +108,12 @@ token: bits: 1024 log: - file: stdout + outputPaths: + - stdout + errorOutputPaths: + - stderr level: DEBUG + encoding: json # tracing provides configuration around traces using OpenTelemetry. # (Optional). By default, a 'noop' tracer provider is used and tracing is disabled.