Fix journald logger #1674
No reviewers
Labels
No labels
P0
P1
P2
P3
badger
frostfs-adm
frostfs-cli
frostfs-ir
frostfs-lens
frostfs-node
good first issue
triage
Infrastructure
blocked
bug
config
discussion
documentation
duplicate
enhancement
go
help wanted
internal
invalid
kludge
observability
perfomance
question
refactoring
wontfix
No project
No assignees
4 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: TrueCloudLab/frostfs-node#1674
Loading…
Add table
Reference in a new issue
No description provided.
Delete branch "dstepanov-yadro/frostfs-node:fix/fix_logger_unused"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
zapcore.NewConsoleEncoder
config.Build
call as follows:6d482535bd/config.go (L283)
Fix #1673
@ -172,0 +171,4 @@
if c.Sampling.Hook != nil {
samplerOpts = append(samplerOpts, zapcore.SamplerHook(c.Sampling.Hook))
}
samplingCore := zapcore.NewSamplerWithOptions(
What if
c.Sampling.Hook == nil
, do we need this wrapper?Yes.
Console logger uses
zap
's production config:6d482535bd/config.go (L161)
. Production config defines, that zap will log only first 100 log entries for each level for 1 second. If there are more than 100 log entries in 1 second for level, then zap will log only 100-th log entries. For example, if there are 300 log entries for levelwarning
, then only 0...99, 100, 200, 300 log entries will be logged.Sampling hook only notifies if log entry was sampled or dropped.
Hm, it was unexpected to me that we have this enabled by default.
Please, mention
Fix #1673
in the OP.e59b426d39
to3f149a0a0a
WIP: Fix journald loggerto Fix journald logger3f149a0a0a
to7893d763d1