Skip to content

Conversation

@billsegall
Copy link
Collaborator

Replace github.com/op/go-logging with go.uber.org/zap

go-logging is unmaintained since 2016 and has significant re-entrancy problems
causing crashes. See for example:
op/go-logging#75
op/go-logging#102
op/go-logging#105

To fix this we introduce a wrapper for a subset of the go-logging library
mapped on to Uber's zap logging library and switch to using that.

go-logging is unmaintained since 2016 and has significant reentrancy problems
causing crashes. See for example:
op/go-logging#75
op/go-logging#102
op/go-logging#105

To fix this we introduce a wrapper for a subset of the go-logging library
mapped on to Uber's zap logging library and switch to using that.
import (
"github.com/lirm/aeron-go/aeron/idlestrategy"
logging "github.com/op/go-logging"
"go.uber.org/zap/zapcore"
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not use the same abstraction here? Seems to be the only exception.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I could remove the archive options that hold the loglevel as they're currently unused. Let me know if you would prefer that for now.

It's my intention to provide methods from the archive to allow runtime control over the logging not only of the level (as foreshadowed) but also in the future to provide access to some further options that make use of the available zap runtime features.

This is for now a minimalist set of code changes across aeron-go that switch to zap. I imagined over time that you may want to adopt more of it generally and more directly but this should get over the immediate concurrency issues without large code changes.

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess it's ok as a step in migration process and it is isolated.

@billsegall
Copy link
Collaborator Author

Was there something you would now have me change here?

Bill.

@lirm lirm merged commit 28ab69e into lirm:master Feb 18, 2022
aayushduwadi pushed a commit to aayushduwadi/aeron-go that referenced this pull request Jul 15, 2025
Revert "Add a method to Header to get the buffer."
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants