micronaut-core
micronaut-core copied to clipboard
Endpoint Logger is not allowing to change default log level
Expected Behavior
the Logger endpoint don't allow any more the POST
to change the log level
$ curl http://localhost:8080/loggers/io.micronaut.http
{"message":"Internal server error: Failed to convert argument [configuredLevel] for value [null] due to: Cannot construct instance of `io.micronaut.core.convert.value.ConvertibleValues` (no Creators, like default constructor, exist): abstract types either need to be mapped to concrete types, have custom deserializer, or contain additional type information\n at [Source: REDACTED (`StreamReadFeature.INCLUDE_SOURCE_IN_LOCATION` disabled); line: 1, column: 1]","_links":{"self":{"href":"/loggers/io.micronaut.security"}}
We are using the jackson implementation, not the micronaut one
Version
4.3.4
I don't understand this bug report. We have passing tests for the management endpoint with jackson. Also your curl command is a GET, not a POST. And the error sounds like there's no deserializer for ConvertibleValues, but we have one for jackson and that is tested too.
oups sorry for bad examples, here is the correct one:
curl -i -X POST -H "Content-Type: application/json" -d '{ "configuredLevel": "TRACE" }' http://localhost:8081/loggers/io.kestra
HTTP/1.1 422 Internal server error
content-type: application/json
date: Tue, 23 Apr 2024 07:32:58 GMT
content-length: 509
{"message":"Internal server error: Failed to convert argument [configuredLevel] for value [null] due to: Cannot construct instance of `io.micronaut.core.convert.value.ConvertibleValues` (no Creators, like default constructor, exist): abstract types either need to be mapped to concrete types, have custom deserializer, or contain additional type information\n at [Source: REDACTED (`StreamReadFeature.INCLUDE_SOURCE_IN_LOCATION` disabled); line: 1, column: 1]","_links":{"self":{"href":"/loggers/io.kestra"}}}kestra@prd-kestra-standalone-6f8b767486-lkzlw:/app$
We have the bug on Kestra, just starting the application and reaching the endpoint failed
$ docker run --rm --name test kestra/kestra:latest server local
$ docker exec -it test bash
kestra@8f55313c9efa:/app$ curl -i -X POST -H "Content-Type: application/json" -d '{ "configuredLevel": "TRACE" }' http://localhost:44369/loggers/io.kestra
HTTP/1.1 422 Internal server error
content-type: application/json
date: Tue, 23 Apr 2024 07:39:22 GMT
content-length: 509
{"message":"Internal server error: Failed to convert argument [configuredLevel] for value [null] due to: Cannot construct instance of `io.micronaut.core.convert.value.ConvertibleValues` (no Creators, like default constructor, exist): abstract typeseither need to be mapped to concrete types, have custom deserializer, or contain additional type information\n at [Source: REDACTED (`StreamReadFeature.INCLUDE_SOURCE_IN_LOCATION` disabled); line: 1, column: 1]","_links":{"self":{"href":"/loggers/io.kestra"}}}kestra@8f55313c9efa:/app$