camel-k icon indicating copy to clipboard operation
camel-k copied to clipboard

[RFE] Allow to set log level of a specific package using logging trait

Open agiertli opened this issue 2 years ago • 6 comments

Currently, we need to set log level of a specific package using property, i.e.: kamel run -p quarkus.log.category.”org.test”.level=DEBUG

It would be nice if we could utilize logging trait for this in some way. i.e.:

kamel run --trait logging."org.test"=DEBUG

This would allow logging to be configured in a consistent way.

agiertli avatar Jan 12 '23 09:01 agiertli

This issue has been automatically marked as stale due to 90 days of inactivity. It will be closed if no further activity occurs within 15 days. If you think that’s incorrect or the issue should never stale, please simply write any comment. Thanks for your contributions!

github-actions[bot] avatar Apr 13 '23 00:04 github-actions[bot]

I can take a look at this

realMartinez avatar Oct 09 '23 08:10 realMartinez

We can mimick route trait configuration where we have:

 -t "route.annotations.'haproxy.router.openshift.io/balance'=true"

and develop something similar with:

 -t "logging.category.'org.test'=DEBUG"

squakez avatar Oct 09 '23 08:10 squakez

@realMartinez @claudio4j what's the status of this? are you going to work on it and include in 2.4 milestone?

squakez avatar Apr 18 '24 14:04 squakez

@realMartinez The previous PR #5279 was declined, since the environment variables were deprecated, but you can use the same code to create the jvm option instead of the environment variable, however to add the new category trait option requires a change in camel-k-runtime project, see GenerateCatalogMojo.java

claudio4j avatar Apr 18 '24 16:04 claudio4j

sure I can take a look at this.

realMartinez avatar Apr 18 '24 20:04 realMartinez