Configuring log level in idea.log
I wrote an IntelliJ plugin which leaves records in idea.log. Sometimes when investigating issues INFO level is not enough, so I'd like the user to switch to DEBUG level for my plugin, reproduce the problem and gather log once again.
As far as I discovered, to switch level for the plugin changes should be made in <IDEA_HOME>/bin/log.xml. The problem here is that on Mac OS with enabled Gatekeeper changing that file will break application — it won't startup with "The application ... is damaged ..." unless user disables Gatekeeper or runs "xattr -rc /path/to/idea/app".
So I wonder whether it is possible to put customized log.xml in some other place that won't bother Gatekeeper (e.g. under ~/Library/...) or maybe there's just other way to configure idea.log log level?
请先登录再写评论。
Your users can set DEBUG level for manually overridden categories via menu Help->Debug Log Settings
Wow, so easy! How did I miss this menu item?
Thank you very much, Yann!
Does the Debug Log Settigns support wildcards?
Johannes Renoth AFAIU no (didn't try, but see com.intellij.diagnostic.DebugLogManager#applyCategories())
May be it will help someone: when you change the Debug Log settings via Help menu item, this somehow does not get reflected in the "host" intellij logs, when you run "runPlugin" task (it only shows logs with WARN and above, i.e. WARN and ERROR)
However, log messages are visible in the
`build/idea-sandbox/system/log/idea.log` file
See also updated topics https://plugins.jetbrains.com/docs/intellij/ide-infrastructure.html#logging and https://plugins.jetbrains.com/docs/intellij/testing-faq.html#how-to-enable-debugtrace-logging