Skip to content

Conversation

@verbotenj
Copy link
Contributor

Fixes #152

{"timestamp":"2024-09-23T19:34:48-04:00","level":"INFO","msg":"","component":"main","plugin":"output.log","type":"event","event":{"type":"chainsync.rollback","timestamp":"2024-09-23T19:34:48.355378-04:00","payload":{"blockHash":"a5363bdbde9888a367f36dbbb0b2d2610c41f3dcd416ce69aa448520744f7294","slotNumber":60478482}}}
{"timestamp":"2024-09-23T19:34:53-04:00","level":"INFO","msg":"","component":"main","plugin":"output.log","type":"event","event":{"type":"chainsync.block","timestamp":"2024-09-23T19:34:53.418663-04:00","context":{"blockNumber":2512374,"slotNumber":60478493,"networkMagic":0},"payload":{"blockBodySize":4,"issuerVkey":"6080b9c76b4b19c21d17b4091aa205417cb80a5449f638c27eec0946","blockHash":"8b49d800f735f420ce67997981f8f1ae76105caa75593bc1a0ac118ec7fbd9a3","transactionCount":0}}}

@verbotenj verbotenj requested a review from a team as a code owner September 23, 2024 23:35
api/api_test.go Outdated
} else {
t.Fatal("pushPlugin does NOT implement APIRouteRegistrar")
t.Error("pushPlugin does NOT implement APIRouteRegistrar")
os.Exit(1)
Copy link
Contributor

Choose a reason for hiding this comment

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

We should leave this as it was. It's not related to slog, and there's no reason to change it.

api/api_test.go Outdated
if err != nil {
t.Fatal(err)
t.Error(err)
os.Exit(1)
Copy link
Contributor

Choose a reason for hiding this comment

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

We should leave this as it was. It's not related to slog, and there's no reason to change it.

// Start debug listener
if cfg.Debug.ListenPort > 0 {
logger.Infof(
logger.Info(
Copy link
Contributor

Choose a reason for hiding this comment

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

This needs an inner fmt.Sprintf()

@verbotenj verbotenj merged commit 4604e48 into main Sep 24, 2024
9 checks passed
@verbotenj verbotenj deleted the chore/change-to-slog branch September 24, 2024 01:48
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.

Switch to slog interface for plugin logging

3 participants