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

streaming: Remove logging pair and key on failure #145

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

Conversation

ptrenwith
Copy link

Consolidate logging.

@@ -151,8 +151,7 @@ func (c *Conn) manageForever() {

for {
if err := c.connect(); err != nil {
log.Printf("luno/streaming: Connection error key=%s pair=%s: %v",
c.keyID, c.pair, err)
log.Printf("luno/streaming: Connection error: %v", err)

Choose a reason for hiding this comment

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

log/slog is available (maybe not for the version we support for luno-go so you can log parameters.

Copy link
Contributor

Choose a reason for hiding this comment

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

I think using slog will defeat the purpose of this change.

Choose a reason for hiding this comment

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

Is the purpose only be able to collect all logs through searching "luno/streaming: Connection error:" on something like Kibana or is it to consolidate metrics?

Copy link
Contributor

Choose a reason for hiding this comment

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

Was going to say we can keep pair, but don't know if it's that useful for this error? 🤔

Copy link
Author

Choose a reason for hiding this comment

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

The purpose is to collate the logs. The pair and key is not particularly useful.

@@ -151,8 +151,7 @@ func (c *Conn) manageForever() {

for {
if err := c.connect(); err != nil {
log.Printf("luno/streaming: Connection error key=%s pair=%s: %v",
c.keyID, c.pair, err)
log.Printf("luno/streaming: Connection error: %v", err)
Copy link
Contributor

Choose a reason for hiding this comment

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

Was going to say we can keep pair, but don't know if it's that useful for this error? 🤔

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.

4 participants