chore(deps): update module dev.gaijin.team/go/golib to v0.8.0#219
Merged
chore(deps): update module dev.gaijin.team/go/golib to v0.8.0#219
Conversation
|
Important Review skippedBot user detected. To trigger a single review, invoke the You can disable this status message by setting the Comment |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## v2.x #219 +/- ##
=======================================
Coverage 92.27% 92.27%
=======================================
Files 1 1
Lines 207 207
=======================================
Hits 191 191
Misses 11 11
Partials 5 5 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
flc1125
approved these changes
Nov 23, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR contains the following updates:
v0.7.0->v0.8.0Warning
Some dependencies could not be looked up. Check the Dependency Dashboard for more information.
Release Notes
GaijinEntertainment/golib (dev.gaijin.team/go/golib)
v0.8.0Compare Source
Major release with breaking changes to logger and stacktrace packages. Please review the Breaking Changes section carefully before upgrading.
This release focuses on improving the logger and stacktrace packages with better caller capture, thread safety, and a simplified adapter interface.
Change
logger.New()constructor signature (a818939,dbbf7a2,ef40e6a)Constructor changed from
New(adapter Adapter, maxLevel int)toNew(adapter Adapter, opts ...Option). ThemaxLevelparameter is now passed viaWithLevel(level)option.Rework
logger.Adapterinterface (3e99e98)The Adapter interface has been simplified. Logger name and stacktrace functionality is now handled by the logger itself, with these values passed as fields.
Remove
NopAdapterand change nil adapter handling (ac007a8)NopAdapterhas been removed. All loggers with nil adapter are now treated as no-op loggers. No-op loggers can only be created withlogger.NewNop().logger.New()now panics if it receives a nil adapter.Change logger name and error passthrough mechanism (
dbbf7a2)Logger name and error are now passed to adapters as fields rather than handled in a special way.
Rework
stacktracepackage API (7d77230,e4d4715)stacktrace.Capture()renamed tostacktrace.CaptureStack().Stacktype is now read-only; modification methods have been removed.Added
New logger configuration options (
a818939,dbbf7a2,ef40e6a)Added multiple new options for configuring logger behavior:
WithLevel(level int)- Set maximum log levelWithCallerAtLevel(level int)- Enable automatic caller capture at or below specified levelWithCallerMapper(fn)- Custom caller frame mapping withDefaultCallerMapperprovidedWithNameMapper(fn)- Custom logger name field mappingWithNameFormatter(fn)- Custom logger name formatting (hierarchical with:or replacement strategies)WithErrorMapper(fn)- Custom error field mappingWithStackTraceMapper(fn)- Custom stacktrace field mappingNew
stacktrace.CaptureCaller()function (e4d4715)Captures a single stack frame with specified skip. More performant for cases when only the caller's frame is required.
New
stacktrace.Frametype (6b86721)Represents a single stack frame containing program counter, file path, line number, and function name. Simplified representation of
runtime.Framethat is safe to store and use after stack trace capture.Logger comparison method (
ef40e6a)New
logger.IsEqual()method for comparing if two loggers are functionally the same.Thread-safe buffer adapter improvements (
bb3745f)bufferadapter.LogEntriestype is now thread-safe. Newbufferadapter.NewWithBuffer()method allows usage of pre-existing buffer.Stacktrace capture support (
dbbf7a2)Full stacktrace capture functionality integrated into logger package.
Changed
Finalize logger documentation (
dbbf7a2)Comprehensive documentation added to the logger package.
Improve adapter documentation (
3e99e98)Added detailed package documentation for
logrusadapter,slogadapter, andzapadapter.Simplify
bufferadapter.New()(bb3745f)Now creates and returns both adapter and buffer together for convenience.
Upgrade golangci-lint configuration (
17f1b9c)Updated linter config to support golangci-lint v2.6 and fixed all lint issues.
Fixed
ef40e6a)Previously, when multiple child loggers changed names, it would result in multiple fields with the same name. The new approach allows for logger name rewrites and custom logger name generation strategies.
Upgrade Guide
For Logger Users:
1. Updating logger.New() calls:
2. Creating no-op loggers:
3. Calling stacktrace functions:
4. Modifying Stack instances:
Remove any code that modifies Stack - it's now read-only. Capture the stack with the correct skip value instead.
For Adapter Implementers:
The
Adapterinterface has been simplified. Logger name and stacktrace functionality is now handled by the logger itself, with these values passed as fields.Review the updated documentation in
logrusadapter,slogadapter, andzapadapterpackages for examples of the new implementation pattern.Contributors
Configuration
📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR was generated by Mend Renovate. View the repository job log.