fix(config)!: require encoding for console and file sinks#1033
fix(config)!: require encoding for console and file sinks#1033lukesteensen merged 7 commits intomasterfrom
Conversation
Signed-off-by: Luke Steensen <luke.steensen@gmail.com>
Signed-off-by: Luke Steensen <luke.steensen@gmail.com>
Signed-off-by: Luke Steensen <luke.steensen@gmail.com>
Signed-off-by: Luke Steensen <luke.steensen@gmail.com>
Signed-off-by: Luke Steensen <luke.steensen@gmail.com>
Signed-off-by: Luke Steensen <luke.steensen@gmail.com>
| #[serde(default)] | ||
| pub target: Target, | ||
| pub encoding: Option<Encoding>, | ||
| pub encoding: Encoding, |
There was a problem hiding this comment.
@LucioFranco shouldn't this have been resolved in #894? I assume we just missed this? Making sure this wasn't intentional.
There was a problem hiding this comment.
I believe I discussed this with you or luke but the reason this sink allows a null encoding is that it makes sense here to auto change how logs are printed since this is a debug sink. Happy to go the other way but for me this one actually made sense to dynamically choose since the downstream service is a human instead of a machine that might expect an encoding.
There was a problem hiding this comment.
I don't remember having that conversation. Do you have this documented anywhere? It should be in Github or Slack somewhere, correct?
There was a problem hiding this comment.
I'd have been ok with leaving it, but I only noticed this because the logic was complex enough that we skipped an entire case and weren't outputting anything at all. That convinced me we should simplify.
| Ok(converted) => log.insert_explicit(field.into(), converted), | ||
| Err(error) => { | ||
| debug!( | ||
| warn!( |
There was a problem hiding this comment.
👍 I believe this transform was merged before we had rate limiting. Unfortunately, #628 didn't cover this transform. I'll do another pass to make sure we're not missing anything new.
binarylogic
left a comment
There was a problem hiding this comment.
This all looks great! Thanks for fixing.
Signed-off-by: Ben Johnson <bjohnson@binarylogic.com>
|
@binarylogic do you know why the semantic PR check is still pending? I thought I did it right... |
|
It's the |
LucioFranco
left a comment
There was a problem hiding this comment.
I added a comment about encoding in console but I'm happy either way.
|
Anything holding this up from merging? I would merge regardless of the semantic check for now. |
Closes #1031
There were a handful of small-ish issues preventing things from working the way our coercer guide claims they should:
This is a breaking change for both the console and file sinks, since the
encodingfield is no longer optional.Upgrade guide
If you're using the
consolesink add theencodingoption:If you're using the
filesink add theencodingoption: