Skip to content

Conversation

fulmicoton
Copy link
Collaborator

Usage example: just visit.

http://localhost:7280/api/v1/log_level?filter=debug,hyper=debug,tantivy=info,quickwit_serve=debug
@fulmicoton fulmicoton force-pushed the dynamic-log-level branch 2 times, most recently from e44561a to 62bf18b Compare March 1, 2024 08:16
Copy link
Contributor

@trinity-1686a trinity-1686a left a comment

Choose a reason for hiding this comment

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

doesn't compile with --features tokio-console currently, otherwise LGTM

@@ -39,7 +40,7 @@ pub fn setup_logging_and_tracing(
level: Level,
ansi_colors: bool,
build_info: &BuildInfo,
) -> anyhow::Result<()> {
) -> anyhow::Result<EnvFilterReloadFn> {
#[cfg(feature = "tokio-console")]
{
if std::env::var_os(QW_ENABLE_TOKIO_CONSOLE_ENV_KEY).is_some() {
Copy link
Contributor

Choose a reason for hiding this comment

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

there is a type error when that feature is enabled Result<()> vs Result<EnvFilterReloadFn>

Comment on lines 36 to 38
warp::path("log_level")
.and(warp::path::end())
.and(with_arg(env_filter_reload_fn))
Copy link
Contributor

Choose a reason for hiding this comment

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

there is no http method selector. this also works with POST, PUT, DELETE, INVALID...
(nonblocking)

@fulmicoton fulmicoton enabled auto-merge (squash) March 5, 2024 02:46
@fulmicoton fulmicoton disabled auto-merge March 5, 2024 03:39
@fulmicoton fulmicoton merged commit 862a7d8 into main Mar 5, 2024
@fulmicoton fulmicoton deleted the dynamic-log-level branch March 5, 2024 03:39
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.

2 participants