Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

log/slog: export Source method in Record for custom handler support #70281

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Commits on Nov 12, 2024

  1. log/slog: export Source method in Record for custom handler support

    Currently, the `source` method in `slog.Record` is not accessible to
    custom handlers, requiring developers to re-implement logic for
    retrieving source location information. This commit exports the `source`
    method as `Source`, enabling consistent access for custom logging
    handlers and reducing code redundancy.
    
    Fixes golang#70280
    
    Change-Id: I3eb3bc60658abc5de95697a10bddd11ab54c6e13
    GitHub-Last-Rev: 5c37e88
    GitHub-Pull-Request: golang#70281
    nesty92 committed Nov 12, 2024
    Configuration menu
    Copy the full SHA
    9121c71 View commit details
    Browse the repository at this point in the history