Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

IntelliJ IDEA plugin development - Log from within plugin

Tags:

How can I log something for debugging purpose from within a IntelliJ plugin? (I'm not using Community Edition)

like image 705
Alireza Mirian Avatar asked Aug 30 '15 07:08

Alireza Mirian


People also ask

How do I see build logs in IntelliJ?

View logs When running your application, you can view the associated local log files in separate tabs of the Run or Debug tool window. For IntelliJ IDEA to identify which logs to show, you need to specify them in the respective run/debug configuration.

How do I debug an IntelliJ plugin?

To debug a pluginSelect Run | Debug... in the main menu, or press Shift+F9 .

How do I check my IntelliJ plugins?

Press Ctrl+Alt+S to open the IDE settings and select Plugins.

Does IntelliJ have a Linter?

IntelliJ IDEA integrates with ESLint and other most popular JavaScript code linters that detect problems in your code without executing it. When installed and enabled, a linter activates automatically every time you open a JavaScript file, reports detected errors and warnings, and suggests quick-fixes where possible.


2 Answers

com.intellij.openapi.diagnostic.Logger is the officially recommended logger to use for IntelliJ plugin development. See this for more details: https://devnet.jetbrains.com/message/5306410#5306410

The thread is old so some of the other information might be outdated, that class still exists and should be used for logging.

like image 55
Zarwan Avatar answered Sep 18 '22 18:09

Zarwan


I think that this will be helpful. It is a wrapper that provides logging based on IDEA internals or java.util.logging (if internals aren't available).

like image 37
Filip Malczak Avatar answered Sep 22 '22 18:09

Filip Malczak