-
Notifications
You must be signed in to change notification settings - Fork 171
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
base: main
Are you sure you want to change the base?
Conversation
41cf496
to
31e50f6
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #2245 +/- ##
==========================================
+ Coverage 75.25% 75.45% +0.20%
==========================================
Files 106 106
Lines 11229 11266 +37
==========================================
+ Hits 8450 8501 +51
+ Misses 2138 2130 -8
+ Partials 641 635 -6 ☔ View full report in Codecov by Sentry. |
Ignored log and state files generated during Juno debugging in VS Code. Prevents clutter and accidental commits of temporary debug files.
4c53ba2
to
911e66a
Compare
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.
911e66a
to
55eb191
Compare
@@ -123,6 +125,7 @@ const ( | |||
defaultCorsEnable = false | |||
defaultVersionedConstantsFile = "" | |||
defaultPluginPath = "" | |||
defaultLogPort = 0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What do you think about setting it e.g. to 9091 by default instead of random? I guess it would keep things more predictable.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
0 doesn't mean random here, it acutally means that it's disabled :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@@ -84,6 +84,8 @@ const ( | |||
corsEnableF = "rpc-cors-enable" | |||
versionedConstantsFileF = "versioned-constants-file" | |||
pluginPathF = "plugin-path" |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice one 👍
See commit messages for more information