Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: rs/zerolog
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v1.35.0
Choose a base ref
...
head repository: rs/zerolog
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v1.35.1
Choose a head ref
  • 1 commit
  • 2 files changed
  • 1 contributor

Commits on Apr 20, 2026

  1. event: restore Err() logging when ErrorStackMarshaler returns nil (#763)

    Commit f6fbd33 added `case nil: return e` in Event.Err() so that when
    ErrorStackMarshaler returns nil (the error has no stack trace), the
    function returns early without logging the error itself.
    
    This was a regression. The previous behaviour was to fall through the
    switch and always call AnErr(ErrorFieldName, err), ensuring the error
    message is logged even when no stack is attached.
    
    Libraries such as elastic/ecs-logging-go-zerolog (and plain fmt.Errorf
    errors) rely on the old behaviour: calling Stack().Err(err) should
    always log the error field; the stack field is additional and optional.
    
    Change the `nil` case from `return e` to a comment (fall-through) so
    that AnErr is called unconditionally. Update the test that was written
    to match the incorrect behaviour.
    
    Fixes #762
    
    Signed-off-by: alliasgher <alliasgher123@gmail.com>
    alliasgher authored Apr 20, 2026
    Configuration menu
    Copy the full SHA
    116c806 View commit details
    Browse the repository at this point in the history
Loading