I would like configure debug logs for a plugin programmatically and at runtime. I found the class mentioned above which seems nice because the items would show up in the Debug Log Settings dialog.
However, they are marked as Internal currently.
Would you consider opening it up for use from a plugin?
This seems too wide use of internals indeed, basically plugin tries to control very low level mechanism of the platform. But why do you need to switch levels programmatically instead of having good default levels sufficient to submit issues from users?
I see LogLevelConfigurationManager.addCategories and LogLevelConfigurationManager.setCategories are actually public APIs so far. So nothing should prevent its use at least for now.
But it may change in the future as LogLevelConfigurationManager is one of api-dump-unreviewed.txt APIs.
Thanks for pointing this out. The parameter type they take, however, is set to internal (LogCategory).
Then, adding programmatically but not being able to remove seems strange to me.
More about my use case: A plugin that has 30+ improvements for a JetBrains product. Each feature is available via a settings toggle and relies on different classes. If a problem occurs, Iād like to be able to specifically turn on debug logs but I prefer to not have them logged always.
From a developer view, this also seems quite convenient.