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

Logging migration #47

Merged
merged 2 commits into from
Feb 18, 2022
Merged

Logging migration #47

merged 2 commits into from
Feb 18, 2022

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.
@@ -16,7 +16,7 @@ package archive

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
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