<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title>Answers to: I would like to modify a log level in production without having to restart the server</title><link>https://answers.axonivy.com/questions/1065/i-would-like-to-modify-a-log-level-in-production-without-having-to-restart-the-server</link><description>&lt;p&gt;Sometimes we want to change the level of logging of a server in production.&lt;/p&gt;
&lt;p&gt;I am not sure this is possible without restarting the server, which is often difficult to manage depending of the customer.&lt;/p&gt;
&lt;p&gt;I know that log4j supports a way to dynamically reload the configuration when a file change has been detected. See &lt;a href="http://logging.apache.org/log4j/1.2/apidocs/org/apache/log4j/xml/DOMConfigurator.html#configureAndWatch%28java.lang.String,%20long%29"&gt;configureAndWatch&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Is it supported in Ivy 4.x/5.x? Is there something we can do to enable this feature?&lt;/p&gt;</description><atom:link href="https://answers.axonivy.com/questions/1065/i-would-like-to-modify-a-log-level-in-production-without-having-to-restart-the-server" rel="self"></atom:link><language>en</language><lastBuildDate>Mon, 01 Dec 2014 12:24:08 -0500</lastBuildDate><item><title>Answer by Reto Weiss</title><link>https://answers.axonivy.com/questions/1065/i-would-like-to-modify-a-log-level-in-production-without-having-to-restart-the-server/1071</link><description>&lt;p&gt;It is possible to change the log level of a Logger in an ivy project. E.g.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;Logger.getLogger(...).setLevel(Level.DEBUG);
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;I have once started an ivy project that displays all current loggers in a tree and gives you the possibility to change threir level. I share this project here: &lt;a href="http://www.filedropper.com/logviewer"&gt;LogViewer.iar&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;You can then deploy that project to the server and use it to change the log level of certain loggers.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Reto Weiss</dc:creator><pubDate>Mon, 01 Dec 2014 12:24:08 -0500</pubDate><guid>https://answers.axonivy.com/questions/1065/i-would-like-to-modify-a-log-level-in-production-without-having-to-restart-the-server/1071</guid></item><item><title>Answer by Reguel Wermelinger</title><link>https://answers.axonivy.com/questions/1065/i-would-like-to-modify-a-log-level-in-production-without-having-to-restart-the-server/1066</link><description>&lt;p&gt;ivy uses the API which does not watch for configuration changes: &lt;a href="http://logging.apache.org/log4j/1.2/apidocs/org/apache/log4j/xml/DOMConfigurator.html#configure%28java.lang.String%29"&gt;DOMConfigurator.html#configure(java.lang.String)&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;today I see no possability to change this behaviour without modifying the ivy core code in &lt;em&gt;ch.ivyteam.log.Logger&lt;/em&gt;. &lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Reguel Wermelinger</dc:creator><pubDate>Mon, 01 Dec 2014 09:00:25 -0500</pubDate><guid>https://answers.axonivy.com/questions/1065/i-would-like-to-modify-a-log-level-in-production-without-having-to-restart-the-server/1066</guid></item></channel></rss>