Skip to content

Commit

Permalink
fixed the logging configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
johnabass committed Nov 20, 2024
1 parent 759cd45 commit 97777d1
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 6 deletions.
6 changes: 5 additions & 1 deletion devMode.go
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,11 @@ token:
bits: 1024
log:
file: stdout
outputPaths:
- stdout
errorOutputPaths:
- stderr
level: DEBUG
encoding: json
`
)
8 changes: 4 additions & 4 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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(
Expand Down
6 changes: 5 additions & 1 deletion themis.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit 97777d1

Please sign in to comment.