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

chore: libwaku - allow to properly set the log level in libwaku and unify a little #2708

Merged
merged 3 commits into from
May 17, 2024

Conversation

Ivansete-status
Copy link
Collaborator

Description

  • Set compilation flags to properly compile chronicles for libwaku
  • Unify the code in the sense that we only expose one proc from the logging module and have a standard logging setup.
  • The log is configured in waku.nim within init proc.
  • In wakunode2 we also set the log before "waku.init" is invoked because we need to setup the logs properly for the "essential rest server" that we start at the beginning

Issue

closes #2411

Copy link

github-actions bot commented May 17, 2024

You can find the image built from this PR at

quay.io/wakuorg/nwaku-pr:2708-rln-v2

Built from 6e8b336

Copy link

github-actions bot commented May 17, 2024

You can find the image built from this PR at

quay.io/wakuorg/nwaku-pr:2708-rln-v1

Built from 6e8b336

@Ivansete-status Ivansete-status marked this pull request as ready for review May 17, 2024 09:47
Copy link
Contributor

@NagyZoltanPeter NagyZoltanPeter left a comment

Choose a reason for hiding this comment

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

LGTM!!!!

buildLibrary name, "library/", "-d:chronicles_log_level=ERROR", "static"
buildLibrary name,
"library/",
"""-d:chronicles_line_numbers -d:chronicles_runtime_filtering=on -d:chronicles_sinks="textlines,json" -d:chronicles_default_output_device=Dynamic -d:chronicles_disabled_topics="eth,dnsdisc.client" """,
Copy link
Contributor

Choose a reason for hiding this comment

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

Just wonder - although I see it is the default in nim.cfg also - why exactly these and only these topics are disabled??? I have no issue with it, just seems such a leftover...

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Just wonder - although I see it is the default in nim.cfg also - why exactly these and only these topics are disabled??? I have no issue with it, just seems such a leftover...

Yes, I agree that this sounds like a leftover. I think for now we can leave them as is and in case we miss those in the future we can reenable them

# Adhere to NO_COLOR initiative: https://no-color.org/
let color =
try:
not parseBool(os.getEnv("NO_COLOR", "false"))
Copy link
Contributor

Choose a reason for hiding this comment

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

It is great!!!!

Copy link
Contributor

@gabrielmer gabrielmer left a comment

Choose a reason for hiding this comment

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

Superr, thanks so much!

@Ivansete-status Ivansete-status merged commit 3faffdb into master May 17, 2024
14 of 15 checks passed
@Ivansete-status Ivansete-status deleted the change-log-level-libwaku branch May 17, 2024 14:28
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.

chore(cbindings): Allow for log level configuration
3 participants