Questions Tagged With dockerhttps://answers.axonivy.com/tags/docker/?type=rss&user=nndiemquestions tagged <span class="tag">docker</span>enTue, 30 Jun 2020 00:38:52 -0400Config ivy log in GCPhttps://answers.axonivy.com/questions/4623/config-ivy-log-in-gcp<h2>Dear ivy team support,</h2> <p>Currently, I'm doing some configuration for the ivy log in GCP environment. Here is my config:</p> <hr> <pre><code> &lt;appender name="ConsoleAppender" class="org.apache.log4j.ConsoleAppender"&gt; &lt;param name="Threshold" value="INFO"/&gt; &lt;param name="Target" value="System.out" /&gt; &lt;layout class="ch.ivyteam.log.layout.IvyLog4jLayout"&gt; &lt;param name="DateFormat" value="yyyy-MM-dd HH:mm:ss.SSS"/&gt; &lt;/layout&gt; &lt;filter class="org.apache.log4j.varia.LevelRangeFilter"&gt; &lt;param name="LevelMin" value="INFO"/&gt; &lt;param name="LevelMax" value="WARN"/&gt; &lt;param name="AcceptOnMatch" value="true"/&gt; &lt;/filter&gt; &lt;/appender&gt; &lt;!-- appender that writes log messages with priority ERROR or higher to stderr --&gt; &lt;appender name="ConsoleAppenderError" class="org.apache.log4j.ConsoleAppender"&gt; &lt;param name="Threshold" value="ERROR"/&gt; &lt;param name="Target" value="System.err" /&gt; &lt;layout class="ch.ivyteam.log.layout.IvyLog4jLayout"&gt; &lt;param name="DateFormat" value="yyyy-MM-dd HH:mm:ss.SSS"/&gt; &lt;/layout&gt; &lt;/appender&gt; &lt;!-- Disable CXF warning at startup (missing META-INF/cxf/cxf.xml) --&gt; &lt;category name="org.apache.cxf.bus.spring" class="ch.ivyteam.log.Logger"&gt; &lt;priority value="ERROR"/&gt; &lt;/category&gt; </code></pre> <hr> <p>But I got the problem: With the exception, it will print each line of exception in the stackDriver log like this picture:</p> <p><img src="https://serving.photos.photobox.com/28132375a8296995992fcbb28aeb802497fe58244761b0962f9f3903c8a51ecd38b4598a.jpg"></p> <hr> <p>We use fluentd and Stackdriver to display the log. <br> As I understood, we have 2 steps to display the log in the GCP <br></p> <ol> <li>Step 1: Base on the configuration in the log4jconfig.xml, Ivy will print the log to the console with the corresponding format so that fluentd can read it and display in the log view<br></li> <li>Step 2: fluentd will read that log and display in the log view.<br></li> </ol> <p>When I check step 2, it is correct because the fluentd displayed exactly the result of step 1. <br> But step 1 got a problem, it prints incorrectly the entry log. I have 1 block exception but it prints to multiline log entries. <br> My expectation: each exception case will be visualized by only 1 entry log so that developer can easier trace the exception reason and find the solution. <br> Could you please give me some advice? <br></p> <p>Thank you</p>nndiemTue, 30 Jun 2020 00:38:52 -0400https://answers.axonivy.com/questions/4623/config-ivy-log-in-gcpdocker