Questions Tagged With log4jhttps://answers.axonivy.com/tags/log4j/?type=rssquestions tagged <span class="tag">log4j</span>enThu, 26 Sep 2019 04:23:20 -0400Configure a separate log file with customizing file name patternhttps://answers.axonivy.com/questions/4029/configure-a-separate-log-file-with-customizing-file-name-pattern<p>Based on the answer from:</p> <p><a href="https://answers.axonivy.com/questions/1852/how-can-i-configure-a-separate-log-file-for-the-runtime-log">https://answers.axonivy.com/questions/1852/how-can-i-configure-a-separate-log-file-for-the-runtime-log</a></p> <p>And:</p> <p><a href="https://stackoverflow.com/questions/5117758/configuring-rollingfileappender-in-log4j">https://stackoverflow.com/questions/5117758/configuring-rollingfileappender-in-log4j</a></p> <p>I see we could customize the file name of the separated log file by using <strong>org.apache.log4j.rolling.RollingFileAppender</strong> instead of <strong>org.apache.log4j.RollingFileAppender</strong> Then I try to add log4j-extras (<a href="https://mvnrepository.com/artifact/log4j/apache-log4j-extras/1.2.17)">https://mvnrepository.com/artifact/log4j/apache-log4j-extras/1.2.17)</a> to <strong>{engine_dir}/plugins</strong>. But it doesn't work.</p> <p>Do I miss anything?</p>dieuphThu, 26 Sep 2019 04:23:20 -0400https://answers.axonivy.com/questions/4029/configure-a-separate-log-file-with-customizing-file-name-patternlog4jivyStore log file content additional in the databasehttps://answers.axonivy.com/questions/3977/store-log-file-content-additional-in-the-database<p>A customer wants to store the log informations additional to a database. This should be possible with log4j - do you have any inputs to this?</p> <p>Best regards, Sven</p>skilchenmannTue, 17 Sep 2019 02:16:01 -0400https://answers.axonivy.com/questions/3977/store-log-file-content-additional-in-the-databaselogginglog4jHow to change the category name of the log when calling REST client by using Ivy.rest().client(...) ?https://answers.axonivy.com/questions/3944/how-to-change-the-category-name-of-the-log-when-calling-rest-client-by-using-ivy-rest-client<p>When I call any REST clients by using Ivy.rest().client(...), it will have the log with the category name [rest_client] from IVY Core. However, I want to make the log messages written into the specific log files of each services. With the same category name for all REST services like this, I could not find any way to configure in log4jconfig.xml to make it correct.</p> <p>If anyone have ideas to change that category name or change the log4j configuration, please help.</p> <p>Thanks in advance.</p>Lieu VoThu, 29 Aug 2019 04:11:43 -0400https://answers.axonivy.com/questions/3944/how-to-change-the-category-name-of-the-log-when-calling-rest-client-by-using-ivy-rest-clientivyrestlog4jHow to find the root cause of error 500, frequently occuring in the logshttps://answers.axonivy.com/questions/3795/how-to-find-the-root-cause-of-error-500-frequently-occuring-in-the-logs<p>Some of users of my wf-app seem to face an error 500 while working. The errors show a viewExpiredException as cause of the problem. Generally this points to a session timeout issue. But as the user fires several request within seconds it doesn't make much sense, that one of the requests should fail with error 500 while others can be served as expected.</p> <p>Unfortunately the behaviour is not 100% reproducible on any dialog. The logs expose the problem for several users but there is no clear pattern to find out which behaviour leads to these errors. Do I have any chance to isolate the real issue behind these error 500 logs?</p>SupportIvyTeamMon, 13 May 2019 07:02:36 -0400https://answers.axonivy.com/questions/3795/how-to-find-the-root-cause-of-error-500-frequently-occuring-in-the-logsrequestjsfloggingajaxlog4jLog Mail with Log4J SMTP Appender doesn't workhttps://answers.axonivy.com/questions/3601/log-mail-with-log4j-smtp-appender-doesn-t-work<p>Hello, i want Axon Ivy to send an Email when there is an error so i added this code to "log4jconfig.xml":</p> <pre><code>&lt; appender name="EmailAppender" class="org.apache.log4j.net.SMTPAppender"&gt; &lt; param name="BufferSize" value="512" / &gt; &lt; param name="SMTPHost" value="smtp.gmail.com" / &gt; &lt; param name="SMTPProtocol" value="smtps" / &gt; &lt; param name="SMTPPort" value="465" / &gt; &lt; param name="SMTPUsername" value=" *** " / &gt; &lt; param name="SMTPPassword" value=" *** " / &gt; &lt; param name="From" value=" *** " / &gt; &lt; param name="To" value=" *** " / &gt; &lt; param name="Subject" value="Testing Log4j Mail Notification" / &gt; &lt; layout class="org.apache.log4j.PatternLayout"&gt; &lt; param name="ConversionPattern" value="%-7p %d [%t] %c %x - %m%n" / &gt; &lt; /layout &gt; &lt; /appender &gt; &lt; root &gt; &lt; level value ="WARN" / &gt; &lt; appender-ref ref="FileLog"/ &gt; &lt; appender-ref ref="EmailAppender"/ &gt; &lt; appender-ref ref="ConsoleAppender"/ &gt; &lt; /root &gt; </code></pre> <p>The FileLog works but i dont receive the email. When i change the order to this:</p> <pre><code>&lt; appender-ref ref="EmailAppender"/ &gt; &lt; appender-ref ref="FileLog"/ &gt; </code></pre> <p>then the FileLog and the MailAppender doesn't work. <br> When i use the same code in an Eclipse Java Project it works and i get the email. </p> <p>What should i do?</p> <p>Edit: Do i have to add mail.jar and activation.jar to my build path in Axon Ivy? In Eclipse i added them to lib and it worked but i don't know how to integrate them to Axon Ivy.</p> <p>Edit2: With Log4j debug=true i get this Error in my logfile: <br> 2019-01-22 16:21:32.230 ERROR [ch.ivyteam.log.LoggerFactory] [main] [] Log4j: Could not configure java.lang.NoClassDefFoundError: javax/mail/internet/AddressException at java.lang.Class.getDeclaredConstructors0(Native Method) at java.lang.Class.privateGetDeclaredConstructors(Class.java:2671) at java.lang.Class.getConstructor0(Class.java:3075) at java.lang.Class.newInstance(Class.java:412) at org.apache.log4j.xml.DOMConfigurator.parseAppender(DOMConfigurator.java:247) at org.apache.log4j.xml.DOMConfigurator.findAppenderByName(DOMConfigurator.java:176) <br> ...</p>karstenkThu, 03 Jan 2019 05:05:38 -0500https://answers.axonivy.com/questions/3601/log-mail-with-log4j-smtp-appender-doesn-t-workxmlloggingemaillog4jDisplay log4j Messages in Runtime Loghttps://answers.axonivy.com/questions/3466/display-log4j-messages-in-runtime-log<p>Is it possible, to configure Logging so that log4j messages from other modules, (like Hibernate) are shown directly in the Designer Runtime Log?</p>petersTue, 02 Oct 2018 04:21:16 -0400https://answers.axonivy.com/questions/3466/display-log4j-messages-in-runtime-logdesignerlogginglog4jHow to change the log level without restarting the enginehttps://answers.axonivy.com/questions/3455/how-to-change-the-log-level-without-restarting-the-engine<p>Is there a way to temporarily change the log level without restarting the ivy engine?</p>Bruno BütlerThu, 27 Sep 2018 08:46:00 -0400https://answers.axonivy.com/questions/3455/how-to-change-the-log-level-without-restarting-the-engineenginelogginglog4jHow to log by command System.out.println() in ivy?https://answers.axonivy.com/questions/2635/how-to-log-by-command-system-out-println-in-ivy<p>Hi all</p> <p>I tried to use that command in ivy but nothing happen in console view. So does anyone know reason why it does not work and can we make it work?</p> <p>Thanks</p>trungdvTue, 23 May 2017 05:01:01 -0400https://answers.axonivy.com/questions/2635/how-to-log-by-command-system-out-println-in-ivylog4jDisable user_code logs on enginehttps://answers.axonivy.com/questions/2151/disable-user_code-logs-on-engine<p>Hi there</p> <p>we have lot of user_code logs within our projects and no time to remove them all. Is there an easy way to disable the user_code output to the logfile?</p> <p>Thanks</p>skilchenmannFri, 28 Oct 2016 14:43:38 -0400https://answers.axonivy.com/questions/2151/disable-user_code-logs-on-enginelogginglog4j