Configuring log level in idea.log

Answered

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?

1
6 comments

Your users can set DEBUG level for manually overridden categories via menu Help->Debug Log Settings

0

Wow, so easy! How did I miss this menu item?
Thank you very much, Yann!

0

Does the Debug Log Settigns support wildcards?

0

Johannes Renoth AFAIU no (didn't try, but see com.intellij.diagnostic.DebugLogManager#applyCategories())

0

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

0

Please sign in to leave a comment.