<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title>Answers to: How to change the log level without restarting the engine</title><link>https://answers.axonivy.com/questions/3455/how-to-change-the-log-level-without-restarting-the-engine</link><description>&lt;p&gt;Is there a way to temporarily change the log level without restarting the ivy engine?&lt;/p&gt;</description><atom:link href="https://answers.axonivy.com/questions/3455/how-to-change-the-log-level-without-restarting-the-engine" rel="self"></atom:link><language>en</language><lastBuildDate>Thu, 25 Oct 2018 00:01:35 -0400</lastBuildDate><item><title>Answer by trungdv</title><link>https://answers.axonivy.com/questions/3455/how-to-change-the-log-level-without-restarting-the-engine/3504</link><description>&lt;p&gt;I have enhanced this one to make it affect for application scope&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;public static void changeLevel(Level level){
    if(level != null) {
        Ivy.log().setLevel(level);
        org.apache.log4j.Logger root = Logger.getRootLogger();
        Enumeration allLoggers = root.getLoggerRepository().getCurrentCategories();
        //set logging level of root and all logging instances in the system
        root.setLevel(level);
        while (allLoggers.hasMoreElements()){
            Category tmpLogger = (Category) allLoggers.nextElement();
            tmpLogger.setLevel(level);
        }
    }
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Here is an &lt;a href="https://github.com/aavn-backyard/EngineLogger"&gt;Ivy project&lt;/a&gt; to do this stuff on engine (with GUI)&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">trungdv</dc:creator><pubDate>Thu, 25 Oct 2018 00:01:35 -0400</pubDate><guid>https://answers.axonivy.com/questions/3455/how-to-change-the-log-level-without-restarting-the-engine/3504</guid></item><item><title>Comment by trungdv on Bruno Bütler's answer</title><link>https://answers.axonivy.com/questions/3455/how-to-change-the-log-level-without-restarting-the-engine#3503</link><description>&lt;p&gt;hi &lt;a href="https://answers.axonivy.com/users/26/bruno-b%C3%BCtler"&gt;&lt;a href="https://answers.axonivy.com/users/26/bruno-b%C3%BCtler"&gt;@Bruno Bütler&lt;/a&gt;&lt;/a&gt;
It's seem that this setting only apply for project that we run this command. For other projects on same application ,it won't work. Is there any way to make it globally for engine? Thanks&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">trungdv</dc:creator><pubDate>Wed, 24 Oct 2018 23:29:55 -0400</pubDate><guid>https://answers.axonivy.com/questions/3455/how-to-change-the-log-level-without-restarting-the-engine#3503</guid></item><item><title>Answer by Bruno Bütler</title><link>https://answers.axonivy.com/questions/3455/how-to-change-the-log-level-without-restarting-the-engine/3456</link><description>&lt;p&gt;The easiest way is to use a little process with a script step and the following code:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;import org.apache.log4j.Level;
ivy.log.setLevel(Level.DEBUG as Level);
&lt;/code&gt;&lt;/pre&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Bruno Bütler</dc:creator><pubDate>Thu, 27 Sep 2018 08:52:06 -0400</pubDate><guid>https://answers.axonivy.com/questions/3455/how-to-change-the-log-level-without-restarting-the-engine/3456</guid></item></channel></rss>