<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Any clue using log4j2 in talend? in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/Any-clue-using-log4j2-in-talend/m-p/2228036#M19436</link>
    <description>This your requirement you can achieve with log4j as well. Why are you guys using tLog4jInit and other components, the log4j support is already built in Talend itself. Look into File -&amp;gt; Project Settings -&amp;gt; Log4j. There you have the template (log4j.xml) configuration available. When you run from command line, you need to pass argument to the job to activate log4j by: 
&lt;BR /&gt; 
&lt;PRE&gt;-DLOG4J_ENABLED=true&lt;/PRE&gt; 
&lt;BR /&gt;If you would like to achieve 
&lt;B&gt;DYNAMIC FILE NAME PER JOB&lt;/B&gt;, then you can instead of hardcoded name use following snippet of config data: 
&lt;BR /&gt; 
&lt;PRE&gt; &amp;nbsp; &amp;nbsp;&amp;lt;appender name="STD-OUT FILE" class="org.apache.log4j.FileAppender"&amp;gt;&lt;BR /&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;param name="File" value="C:/p4/Logging/${TalendJob.log}.STDOUT"/&amp;gt; &lt;BR /&gt;		&amp;lt;param name="Threshold" value="TRACE"/&amp;gt; &lt;BR /&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;layout class="org.apache.log4j.PatternLayout"&amp;gt;&lt;BR /&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;param name="ConversionPattern" value="%d - %c -%-4r  %-5p %x - %m%n" /&amp;gt;&lt;BR /&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;/layout&amp;gt;&lt;BR /&gt; &amp;nbsp; &amp;nbsp;&amp;lt;/appender&amp;gt;&lt;/PRE&gt; 
&lt;BR /&gt;That's it. 
&lt;BR /&gt;regarding log4j2 I am affraid there will be required to change the class load from: 
&lt;BR /&gt; 
&lt;PRE&gt;org.apache.log4j.Logger&lt;/PRE&gt; 
&lt;BR /&gt;to: 
&lt;BR /&gt; 
&lt;PRE&gt;import org.apache.logging.log4j.LogManager;&lt;BR /&gt;import org.apache.logging.log4j.Logger;&lt;BR /&gt; &lt;BR /&gt;public class MyTalendClass {&lt;BR /&gt; &amp;nbsp; &amp;nbsp;private static final Logger logger = LogManager.getLogger("MyTalendClass");&lt;/PRE&gt; 
&lt;BR /&gt;I created 2 new feature tickets available at: 
&lt;BR /&gt; 
&lt;A href="https://jira.talendforge.org/browse/TDI-33262" target="_blank" rel="nofollow noopener noreferrer"&gt;Support for Apache Log4j2&lt;/A&gt; 
&lt;BR /&gt;This is about how I see the future logging in Talend, you can use log4j JDBC subsystem to log for database filtered messages (ERROR and WARNING and even more filtering on content. 
&lt;BR /&gt;Another story is auditing execution Talend job out of the box. The idea is that the Job template itself with log 3 basic events which are happening inside: 
&lt;BR /&gt; 
&lt;BR /&gt;ENTRY - the job is going to be executed 
&lt;BR /&gt;EXIT - the job finished without issue 
&lt;BR /&gt;ERROR - the job finished with error 
&lt;BR /&gt;You can then easily see ENTRY-EXIT pairs and you know it is fine, or you log ENTRY-ERROR and something is wrong, any other combination is considered as bug. 
&lt;BR /&gt;This can be extended with also component based flow events: 
&lt;BR /&gt; 
&lt;BR /&gt;tComponentEntry 
&lt;BR /&gt;tComponentError 
&lt;BR /&gt;tComponentExit 
&lt;BR /&gt;enriched by some metadata. 
&lt;BR /&gt;For such purposes there can be created specific log level for example called AUDIT which can show the sequence execution and store this sequence into database for automated checking of the health status and monitoring purposes. In case of log4j via JDBC subsystem again. 
&lt;BR /&gt;This is can be achieved by 2 ways: 
&lt;BR /&gt;There will be added somewhere to tLogCatcher and other logging components some checkboxes to capture new events. Or it will be implemented inside the Job template itself and can be configured globally via File-&amp;gt; Project Settings..... 
&lt;BR /&gt;I created another ticket for this, let's see if this idea will find others to support &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt; 
&lt;BR /&gt; 
&lt;A href="https://jira.talendforge.org/browse/TDI-33263" target="_blank" rel="nofollow noopener noreferrer"&gt;Audit logging of job execution&lt;/A&gt; 
&lt;BR /&gt;Ladislav</description>
    <pubDate>Mon, 13 Jul 2015 14:15:17 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2015-07-13T14:15:17Z</dc:date>
    <item>
      <title>Any clue using log4j2 in talend?</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Any-clue-using-log4j2-in-talend/m-p/2228031#M19431</link>
      <description>Hi Master,&lt;BR /&gt;Is there any clue how to use log4j2 in Talend?&lt;BR /&gt;Thank you and best regards,</description>
      <pubDate>Wed, 21 Jan 2015 07:08:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Any-clue-using-log4j2-in-talend/m-p/2228031#M19431</guid>
      <dc:creator>orawajar</dc:creator>
      <dc:date>2015-01-21T07:08:03Z</dc:date>
    </item>
    <item>
      <title>Re: Any clue using log4j2 in talend?</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Any-clue-using-log4j2-in-talend/m-p/2228032#M19432</link>
      <description>Hi,&lt;BR /&gt;Are you looking for&amp;nbsp;&lt;FONT size="1"&gt;&lt;FONT face="Verdana, Helvetica, Arial, sans-serif"&gt;log4j components which&amp;nbsp;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size="2"&gt;&lt;FONT face="Calibri, sans-serif"&gt;are custom components developed by our community user and shared on &lt;A href="https://www.talendforge.org/exchange/index.php" target="_blank" rel="nofollow noopener noreferrer"&gt;Talend Exchange&lt;/A&gt;?&lt;/FONT&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;FONT size="2"&gt;&lt;FONT face="Calibri, sans-serif"&gt;Best regards&lt;/FONT&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="2"&gt;&lt;FONT face="Calibri, sans-serif"&gt;Sabrina&lt;/FONT&gt;&lt;/FONT&gt;</description>
      <pubDate>Thu, 22 Jan 2015 07:25:19 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Any-clue-using-log4j2-in-talend/m-p/2228032#M19432</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-01-22T07:25:19Z</dc:date>
    </item>
    <item>
      <title>Re: Any clue using log4j2 in talend?</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Any-clue-using-log4j2-in-talend/m-p/2228033#M19433</link>
      <description>Hi xdshi,
&lt;BR /&gt;Yes if any, 
&lt;BR /&gt;i know component 
&lt;A href="https://www.talendforge.org/exchange/index.php?eid=211&amp;amp;product=tos&amp;amp;action=view&amp;amp;nav=1,1,1" target="_blank" rel="nofollow noopener noreferrer"&gt;tLog4j&lt;/A&gt; but it use log4j not log4j2. Can i use it with log4j2? if yes, How?
&lt;BR /&gt;Thanks before,</description>
      <pubDate>Thu, 22 Jan 2015 08:19:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Any-clue-using-log4j2-in-talend/m-p/2228033#M19433</guid>
      <dc:creator>orawajar</dc:creator>
      <dc:date>2015-01-22T08:19:42Z</dc:date>
    </item>
    <item>
      <title>Re: Any clue using log4j2 in talend?</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Any-clue-using-log4j2-in-talend/m-p/2228034#M19434</link>
      <description>Hi,
&lt;BR /&gt;We didn't use it with log4j 2 before. Could you please give us more information about your job requirement?
&lt;BR /&gt;Best regards
&lt;BR /&gt;Sabrina</description>
      <pubDate>Thu, 22 Jan 2015 09:11:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Any-clue-using-log4j2-in-talend/m-p/2228034#M19434</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-01-22T09:11:55Z</dc:date>
    </item>
    <item>
      <title>Re: Any clue using log4j2 in talend?</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Any-clue-using-log4j2-in-talend/m-p/2228035#M19435</link>
      <description>I need to create log file : 
&lt;BR /&gt;1. Max size of each log file is : 1Mb 
&lt;BR /&gt;2. Daily Rolling, if the date changed, it will create new log file 
&lt;BR /&gt;3. Log file name pattern : app_%d{yyyyMMdd}_%i.log (where i is sequential number if more than 1 log file created in a day). 
&lt;BR /&gt;Do you have any idea? 
&lt;BR /&gt;Thank you and best regards,</description>
      <pubDate>Fri, 23 Jan 2015 04:10:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Any-clue-using-log4j2-in-talend/m-p/2228035#M19435</guid>
      <dc:creator>orawajar</dc:creator>
      <dc:date>2015-01-23T04:10:10Z</dc:date>
    </item>
    <item>
      <title>Re: Any clue using log4j2 in talend?</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Any-clue-using-log4j2-in-talend/m-p/2228036#M19436</link>
      <description>This your requirement you can achieve with log4j as well. Why are you guys using tLog4jInit and other components, the log4j support is already built in Talend itself. Look into File -&amp;gt; Project Settings -&amp;gt; Log4j. There you have the template (log4j.xml) configuration available. When you run from command line, you need to pass argument to the job to activate log4j by: 
&lt;BR /&gt; 
&lt;PRE&gt;-DLOG4J_ENABLED=true&lt;/PRE&gt; 
&lt;BR /&gt;If you would like to achieve 
&lt;B&gt;DYNAMIC FILE NAME PER JOB&lt;/B&gt;, then you can instead of hardcoded name use following snippet of config data: 
&lt;BR /&gt; 
&lt;PRE&gt; &amp;nbsp; &amp;nbsp;&amp;lt;appender name="STD-OUT FILE" class="org.apache.log4j.FileAppender"&amp;gt;&lt;BR /&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;param name="File" value="C:/p4/Logging/${TalendJob.log}.STDOUT"/&amp;gt; &lt;BR /&gt;		&amp;lt;param name="Threshold" value="TRACE"/&amp;gt; &lt;BR /&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;layout class="org.apache.log4j.PatternLayout"&amp;gt;&lt;BR /&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;param name="ConversionPattern" value="%d - %c -%-4r  %-5p %x - %m%n" /&amp;gt;&lt;BR /&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;/layout&amp;gt;&lt;BR /&gt; &amp;nbsp; &amp;nbsp;&amp;lt;/appender&amp;gt;&lt;/PRE&gt; 
&lt;BR /&gt;That's it. 
&lt;BR /&gt;regarding log4j2 I am affraid there will be required to change the class load from: 
&lt;BR /&gt; 
&lt;PRE&gt;org.apache.log4j.Logger&lt;/PRE&gt; 
&lt;BR /&gt;to: 
&lt;BR /&gt; 
&lt;PRE&gt;import org.apache.logging.log4j.LogManager;&lt;BR /&gt;import org.apache.logging.log4j.Logger;&lt;BR /&gt; &lt;BR /&gt;public class MyTalendClass {&lt;BR /&gt; &amp;nbsp; &amp;nbsp;private static final Logger logger = LogManager.getLogger("MyTalendClass");&lt;/PRE&gt; 
&lt;BR /&gt;I created 2 new feature tickets available at: 
&lt;BR /&gt; 
&lt;A href="https://jira.talendforge.org/browse/TDI-33262" target="_blank" rel="nofollow noopener noreferrer"&gt;Support for Apache Log4j2&lt;/A&gt; 
&lt;BR /&gt;This is about how I see the future logging in Talend, you can use log4j JDBC subsystem to log for database filtered messages (ERROR and WARNING and even more filtering on content. 
&lt;BR /&gt;Another story is auditing execution Talend job out of the box. The idea is that the Job template itself with log 3 basic events which are happening inside: 
&lt;BR /&gt; 
&lt;BR /&gt;ENTRY - the job is going to be executed 
&lt;BR /&gt;EXIT - the job finished without issue 
&lt;BR /&gt;ERROR - the job finished with error 
&lt;BR /&gt;You can then easily see ENTRY-EXIT pairs and you know it is fine, or you log ENTRY-ERROR and something is wrong, any other combination is considered as bug. 
&lt;BR /&gt;This can be extended with also component based flow events: 
&lt;BR /&gt; 
&lt;BR /&gt;tComponentEntry 
&lt;BR /&gt;tComponentError 
&lt;BR /&gt;tComponentExit 
&lt;BR /&gt;enriched by some metadata. 
&lt;BR /&gt;For such purposes there can be created specific log level for example called AUDIT which can show the sequence execution and store this sequence into database for automated checking of the health status and monitoring purposes. In case of log4j via JDBC subsystem again. 
&lt;BR /&gt;This is can be achieved by 2 ways: 
&lt;BR /&gt;There will be added somewhere to tLogCatcher and other logging components some checkboxes to capture new events. Or it will be implemented inside the Job template itself and can be configured globally via File-&amp;gt; Project Settings..... 
&lt;BR /&gt;I created another ticket for this, let's see if this idea will find others to support &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt; 
&lt;BR /&gt; 
&lt;A href="https://jira.talendforge.org/browse/TDI-33263" target="_blank" rel="nofollow noopener noreferrer"&gt;Audit logging of job execution&lt;/A&gt; 
&lt;BR /&gt;Ladislav</description>
      <pubDate>Mon, 13 Jul 2015 14:15:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Any-clue-using-log4j2-in-talend/m-p/2228036#M19436</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-07-13T14:15:17Z</dc:date>
    </item>
    <item>
      <title>Re: Any clue using log4j2 in talend?</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Any-clue-using-log4j2-in-talend/m-p/2228037#M19437</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Any chance to add current date to the log name?&lt;/P&gt;
&lt;P&gt;something like this:&lt;/P&gt;
&lt;P&gt;&amp;lt;param name="file" value="${TalendJob.log}_"getCurrentDatetime()".log"&amp;gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;TIA&lt;/P&gt;</description>
      <pubDate>Mon, 08 Apr 2019 15:03:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Any-clue-using-log4j2-in-talend/m-p/2228037#M19437</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-04-08T15:03:32Z</dc:date>
    </item>
  </channel>
</rss>

