logging to the user console
I want to write some my plugin logs to the user console likewise System.out.println(). How to implement it? Is it possible with log4j or something another (except System.out.println()) :) ?
Thanks
Please sign in to leave a comment.
there's a log.xml file in the $IDEA_install_dir/bin directory.
And IDEA publishes a Logger (com.intellij.openapi.diagnostic.Logger) that is used like any Log4j logger.
Does that solve your problem ?
Yes, it does. I have used com.intellij.openapi.diagnostic.Logger .
Thanks you very match:)
I need logging from my plugin to specify path.How to set IDEA Logger (com.intellij.openapi.diagnostic.Logger) for that?
Thanks.
Open API doesn't consists solution for that:(..
Message was edited by:
Denis Alexandrov
I have added into log.xml "own" appender:
]]>
<param name="ConversionPattern" value="%d %6p - %30.30c - %m \n"/>
]]>
Log file is created but nothing to write into it. Log is empty..
Can anyone tell me What Did I Do Wrong?
Thanks
I'am sorry.Problem is solved .
Message was edited by:
Denis Alexandrov
I have created own ConsoleView like below:
ToolWindowManager manager = ToolWindowManager.getInstance(project);
String id = "Test";
TextConsoleBuilderFactory factory = TextConsoleBuilderFactory.getInstance();
ConsoleView view = factory.createBuilder(project).getConsole();
ToolWindow window = manager.getToolWindow(id);
// etc..
And I have created "own logging" as I have been telling in previous post.
I want that my logs from my package has been printing in my "own logging":)
Do You Have Any Idea?:)...
Message was edited by:
Denis Alexandrov
How can I attach my ConsoleView to our idea log4j process with method attachToProcess(ProcessHandler processHandler) ?
Sample "our idea log4j process w" in the screenshot.
Message was edited by:
Denis Alexandrov
Attachment(s):
2.jpg