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

Create a dynamic logger (Fixes #1181) #2245

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

Conversation

derrix060
Copy link
Contributor

See commit messages for more information

utils/log.go Fixed Show fixed Hide fixed
@derrix060 derrix060 force-pushed the mario/dynamic-logger branch from 41cf496 to 31e50f6 Compare November 4, 2024 10:51
Copy link

codecov bot commented Nov 4, 2024

Codecov Report

Attention: Patch coverage is 72.04301% with 26 lines in your changes missing coverage. Please review.

Project coverage is 78.91%. Comparing base (e4240ac) to head (55eb191).
Report is 90 commits behind head on main.

Files with missing lines Patch % Lines
node/node.go 71.42% 6 Missing and 2 partials ⚠️
cmd/juno/juno.go 30.00% 7 Missing ⚠️
utils/log.go 86.36% 5 Missing and 1 partial ⚠️
node/http.go 44.44% 4 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2245      +/-   ##
==========================================
+ Coverage   75.25%   78.91%   +3.65%     
==========================================
  Files         106      112       +6     
  Lines       11229    13561    +2332     
==========================================
+ Hits         8450    10701    +2251     
- Misses       2138     2147       +9     
- Partials      641      713      +72     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Ignored log and state files generated during Juno debugging in VS Code.
Prevents clutter and accidental commits of temporary debug files.
@derrix060 derrix060 force-pushed the mario/dynamic-logger branch 2 times, most recently from 4c53ba2 to 911e66a Compare November 5, 2024 22:14
Introduce HTTP server to dynamically adjust log levels at runtime.
Refactor log level handling to use a new LogLevel struct.
Update tests and documentation to reflect these changes.

Enhances logging flexibility and improves runtime configurability.
@derrix060 derrix060 force-pushed the mario/dynamic-logger branch from 911e66a to 55eb191 Compare November 6, 2024 14:59
@@ -84,6 +84,8 @@ const (
corsEnableF = "rpc-cors-enable"
versionedConstantsFileF = "versioned-constants-file"
pluginPathF = "plugin-path"
Copy link
Contributor

Choose a reason for hiding this comment

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

Should we add the logF flag to keep it consistent with the rest of the configuration? Like metricsF, grpcF, or httpF?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

wdym? I've added this logHostF and logPortF

Do you mean a boolean flag to enable/disable the log host?

Copy link
Contributor

Choose a reason for hiding this comment

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

Yeep, but indeed it might be a little bit redundant, but the rest of the configuration includes it. Perhaps it’s better to simplify the others instead

Copy link
Contributor

@pnowosie pnowosie left a comment

Choose a reason for hiding this comment

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

Nice one 👍

@derrix060 derrix060 enabled auto-merge (rebase) November 26, 2024 19:28
@derrix060 derrix060 force-pushed the mario/dynamic-logger branch 2 times, most recently from 06930ca to 55eb191 Compare January 6, 2025 12:32
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.

3 participants