How to actually do a POST to change level? #358
Replies: 8 comments 9 replies
-
When querying for logs it returns fine:
|
Beta Was this translation helpful? Give feedback.
-
This is the code that gets executed? private void handlePost(HttpServerRequest request, HttpServerResponse response) {
String contentType = request.getHeader("Content-Type");
if (!"application/x-www-form-urlencoded".equals(contentType)) {
response.setStatusCode(415).end();
return;
}
String loggerName = request.getFormAttribute(LOGGER_NAME_PARAM);
String loggerLevel = request.getFormAttribute(LOGGER_LEVEL_PARAM);
if (loggerLevel == null || loggerLevel.isEmpty()) {
LogController.updateLogLevel(loggerName, null);
} else {
LogController.updateLogLevel(loggerName, loggerLevel);
}
response.setStatusCode(201).end();
} Using the actual string name of the field instead of the constant. Same same |
Beta Was this translation helpful? Give feedback.
-
Have you tried doing this in Swagger UI: https://github.com/quarkiverse/quarkus-logging-manager?tab=readme-ov-file#openapi If it does not work there, it;s a bug. Also try switching off the management port and see if if works in 8080. Then we can narrow it down to management port. |
Beta Was this translation helpful? Give feedback.
-
I also removed management port and now I get Error 404 |
Beta Was this translation helpful? Give feedback.
-
OK sorry I could not help. This is probably a bug (I see there is no test cases for POST). THis might be a regression. Can you create an issue with a reproducer ? That will ensure a quick fix. Thanks |
Beta Was this translation helpful? Give feedback.
-
There is a bug in the way when quarkus.management is enabled. It defaults to port 9000 |
Beta Was this translation helpful? Give feedback.
-
Here you are https://github.com/MikaelAnderssonWigander/logging-manager-management.git |
Beta Was this translation helpful? Give feedback.
-
Issue created as well, #359 |
Beta Was this translation helpful? Give feedback.
-
Hi
I'm testing this extension out but I can't find any documentation on how to actually POST a change of logging level.
Using httpie in CLI
returns an error
Quarkus 3.19.2 and extension 3.3.2
Not sure if this is extension related or not…
Beta Was this translation helpful? Give feedback.
All reactions