<?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: log4j to a file in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/log4j-to-a-file/m-p/2326688#M96144</link>
    <description>&lt;P&gt;Hi@xdshi ,I've tried your method too, but it doesn't work.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 27 Mar 2018 10:15:48 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2018-03-27T10:15:48Z</dc:date>
    <item>
      <title>log4j to a file</title>
      <link>https://community.qlik.com/t5/Talend-Studio/log4j-to-a-file/m-p/2326683#M96139</link>
      <description>&lt;P&gt;&lt;SPAN&gt;Hi,&amp;nbsp;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I need help to write log4j logging information to a file. By default log4J is writing on console. How should I configure, and where should I configure If I want log4J to write logging information to a file like " c:/log.txt ". &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Abhi529&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 01 Sep 2017 08:50:07 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/log4j-to-a-file/m-p/2326683#M96139</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-09-01T08:50:07Z</dc:date>
    </item>
    <item>
      <title>Re: log4j to a file</title>
      <link>https://community.qlik.com/t5/Talend-Studio/log4j-to-a-file/m-p/2326684#M96140</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt; 
&lt;P&gt;Please take a look at this related topic:&lt;A title="https://community.talend.com/t5/Design-and-Development/Issue-with-tRest/m-p/31782" href="https://community.qlik.com/s/feed/0D53p00007vCoo9CAC" target="_self"&gt;https://community.talend.com/t5/Design-and-Development/Issue-with-tRest/m-p/31782&lt;/A&gt;&lt;/P&gt; 
&lt;P&gt;You can do this with a little Java code in a tJava component at the beginning of your Job or use a custom component tredirectOutput.&lt;/P&gt; 
&lt;P&gt;Let us know if it is Ok with you.&lt;/P&gt; 
&lt;P&gt;Best regards&lt;/P&gt; 
&lt;P&gt;Sabrina&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 01 Sep 2017 10:19:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/log4j-to-a-file/m-p/2326684#M96140</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-09-01T10:19:34Z</dc:date>
    </item>
    <item>
      <title>Re: log4j to a file</title>
      <link>https://community.qlik.com/t5/Talend-Studio/log4j-to-a-file/m-p/2326685#M96141</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;SPAN class=""&gt;&lt;A href="https://community.qlik.com/s/profile/00539000004XsaeAAC" target="_self"&gt;@xdshi&lt;/A&gt;,&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&lt;SPAN class=""&gt;thanks for your answer but it is not work for me.&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&lt;SPAN class=""&gt;I have added the following code into log4j.xml.....then still i am unable to get the the log4j file in reqired location...&lt;/SPAN&gt;&lt;/P&gt; 
&lt;PRE&gt; &amp;lt;appender name="DailyFileAppender" class="org.apache.log4j.DailyRollingFileAppender"&amp;gt;
		&amp;lt;param name="DatePattern" value="'.'yyyy-MM-dd"/&amp;gt;
		&amp;lt;param name="File" value="c:/log/myjob.txt "/&amp;gt;
		&amp;lt;param name="Append" value="true"/&amp;gt;
		&amp;lt;layout class="org.apache.log4j.PatternLayout"&amp;gt;
			&amp;lt;param name="ConversionPattern" value="%d{HH:mm:ss,SSS} %-5p %c{2} - %m%n"/&amp;gt;
		&amp;lt;/layout&amp;gt;
	&amp;lt;/appender&amp;gt;&lt;/PRE&gt; 
&lt;P&gt;&lt;SPAN class=""&gt;Please find below image...&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&lt;SPAN class=""&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Capture_log4j.JPG" style="width: 770px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009LwQT.jpg"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/136598iA070087E771AF944/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009LwQT.jpg" alt="0683p000009LwQT.jpg" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&lt;SPAN class=""&gt;Thanks,&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&lt;SPAN class=""&gt;Abhi529&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 01 Sep 2017 10:41:27 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/log4j-to-a-file/m-p/2326685#M96141</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-09-01T10:41:27Z</dc:date>
    </item>
    <item>
      <title>Re: log4j to a file</title>
      <link>https://community.qlik.com/t5/Talend-Studio/log4j-to-a-file/m-p/2326686#M96142</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;You added code &lt;SPAN class=""&gt;into log4j.xml?&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;Have you tried to use this custom component tredirectoutput which is used to redirect all the message printed on the console to a file. to see if it works?&lt;/P&gt;
&lt;P&gt;Best regards&lt;/P&gt;
&lt;P&gt;Sabrina&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 01 Sep 2017 11:04:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/log4j-to-a-file/m-p/2326686#M96142</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-09-01T11:04:39Z</dc:date>
    </item>
    <item>
      <title>Re: log4j to a file</title>
      <link>https://community.qlik.com/t5/Talend-Studio/log4j-to-a-file/m-p/2326687#M96143</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt; 
&lt;P&gt;Is there any update for your issue? Feel free to post your issue here.&lt;/P&gt; 
&lt;P&gt;Best regards&lt;/P&gt; 
&lt;P&gt;Sabrina&lt;/P&gt;</description>
      <pubDate>Mon, 04 Sep 2017 04:06:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/log4j-to-a-file/m-p/2326687#M96143</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-09-04T04:06:10Z</dc:date>
    </item>
    <item>
      <title>Re: log4j to a file</title>
      <link>https://community.qlik.com/t5/Talend-Studio/log4j-to-a-file/m-p/2326688#M96144</link>
      <description>&lt;P&gt;Hi@xdshi ,I've tried your method too, but it doesn't work.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 27 Mar 2018 10:15:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/log4j-to-a-file/m-p/2326688#M96144</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-03-27T10:15:48Z</dc:date>
    </item>
    <item>
      <title>Re: log4j to a file</title>
      <link>https://community.qlik.com/t5/Talend-Studio/log4j-to-a-file/m-p/2326689#M96145</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;Which section will block you? Are you able using tJava component to save your output in a file?&lt;/P&gt;
&lt;P&gt;Best regards&lt;/P&gt;
&lt;P&gt;Sabrina&lt;/P&gt;</description>
      <pubDate>Thu, 29 Mar 2018 07:32:01 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/log4j-to-a-file/m-p/2326689#M96145</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-03-29T07:32:01Z</dc:date>
    </item>
    <item>
      <title>Re: log4j to a file</title>
      <link>https://community.qlik.com/t5/Talend-Studio/log4j-to-a-file/m-p/2326690#M96146</link>
      <description>&lt;P&gt;Thank you for your answer.But how do I use the tJava component&amp;nbsp; to output the content of log4j?&lt;/P&gt;</description>
      <pubDate>Mon, 02 Apr 2018 10:21:35 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/log4j-to-a-file/m-p/2326690#M96146</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-04-02T10:21:35Z</dc:date>
    </item>
    <item>
      <title>Re: log4j to a file</title>
      <link>https://community.qlik.com/t5/Talend-Studio/log4j-to-a-file/m-p/2326691#M96147</link>
      <description>&lt;P&gt;Hi all,&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;You need to complete with this at the end :&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;PRE&gt;    &amp;lt;!-- Root Logger --&amp;gt;  
	&amp;lt;root&amp;gt;
		&amp;lt;priority value ="warn"/&amp;gt;
		&amp;lt;appender-ref ref="CONSOLE"/&amp;gt;
		&amp;lt;appender-ref ref="DailyFileAppender"/&amp;gt;
	&amp;lt;/root&amp;gt;&lt;/PRE&gt; 
&lt;P&gt;Here my complete configuration :&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;PRE&gt;&amp;lt;?xml version="1.0" encoding="UTF-8"?&amp;gt;
&amp;lt;!DOCTYPE log4j:configuration SYSTEM "log4j.dtd"&amp;gt;
  
&amp;lt;log4j:configuration xmlns:log4j='http://jakarta.apache.org/log4j/' &amp;gt;
  
  	&amp;lt;!--  CONSOLE appender  --&amp;gt;
	&amp;lt;appender name="CONSOLE" class="org.apache.log4j.ConsoleAppender"&amp;gt;
		&amp;lt;layout class="org.apache.log4j.PatternLayout"&amp;gt;
		 	&amp;lt;param name="ConversionPattern"  
		  		value="[%-5p]: %c - %m%n" /&amp;gt;
		&amp;lt;/layout&amp;gt;
	&amp;lt;/appender&amp;gt;

 &amp;lt;appender name="DailyFileAppender" class="org.apache.log4j.DailyRollingFileAppender"&amp;gt;
		&amp;lt;param name="DatePattern" value="'.'yyyy-MM-dd"/&amp;gt;
		&amp;lt;param name="File" value="c:/log/myjob.txt "/&amp;gt;
		&amp;lt;param name="Append" value="true"/&amp;gt;
		&amp;lt;layout class="org.apache.log4j.PatternLayout"&amp;gt;
			&amp;lt;param name="ConversionPattern" value="%d{HH:mm:ss,SSS} %-5p %c{2} - %m%n"/&amp;gt;
		&amp;lt;/layout&amp;gt;
&amp;lt;/appender&amp;gt;
	
	&amp;lt;!-- logstash appender --&amp;gt;
    &amp;lt;!-- &amp;lt;appender name="LOGSTASH" class="org.apache.log4j.net.SocketAppender"&amp;gt;
        &amp;lt;param name="RemoteHost" value="localhost"/&amp;gt;
        &amp;lt;param name="Port" value="8052"/&amp;gt;
    &amp;lt;/appender&amp;gt; --&amp;gt;
	
	&amp;lt;!-- Spring Logger --&amp;gt;  
	&amp;lt;logger name="log4j.logger.org.springframework"&amp;gt;  
        &amp;lt;level value="WARN" /&amp;gt;  
        &amp;lt;appender-ref ref="CONSOLE"/&amp;gt;
    &amp;lt;/logger&amp;gt;
    
    &amp;lt;!-- throwableRenderer &amp;lt;throwableRenderer class="org.apache.log4j.EnhancedThrowableRenderer"/&amp;gt;--&amp;gt; 
	
    &amp;lt;!-- Root Logger --&amp;gt;  
	&amp;lt;root&amp;gt;
		&amp;lt;priority value ="warn"/&amp;gt;
		&amp;lt;appender-ref ref="CONSOLE"/&amp;gt;
		&amp;lt;appender-ref ref="DailyFileAppender"/&amp;gt;
	&amp;lt;/root&amp;gt;
&amp;lt;/log4j:configuration&amp;gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 17 Apr 2019 15:17:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/log4j-to-a-file/m-p/2326691#M96147</guid>
      <dc:creator>charlesclement1</dc:creator>
      <dc:date>2019-04-17T15:17:26Z</dc:date>
    </item>
    <item>
      <title>Re: log4j to a file</title>
      <link>https://community.qlik.com/t5/Talend-Studio/log4j-to-a-file/m-p/2326692#M96148</link>
      <description>&lt;P&gt;I think your appender name has to be FILE not DailyFileAppender&lt;/P&gt;</description>
      <pubDate>Tue, 02 Jul 2019 21:10:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/log4j-to-a-file/m-p/2326692#M96148</guid>
      <dc:creator>tale103108</dc:creator>
      <dc:date>2019-07-02T21:10:03Z</dc:date>
    </item>
    <item>
      <title>Re: log4j to a file</title>
      <link>https://community.qlik.com/t5/Talend-Studio/log4j-to-a-file/m-p/2326693#M96149</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am new to Talend and wanted to know if there is a way by which I can use any param(e.g. param "File") defined in the below configuration, inside a component in Talend?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Regards,&lt;/P&gt;
&lt;P&gt;Puneet&lt;/P&gt;</description>
      <pubDate>Fri, 10 Apr 2020 14:51:46 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/log4j-to-a-file/m-p/2326693#M96149</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-04-10T14:51:46Z</dc:date>
    </item>
    <item>
      <title>Re: log4j to a file</title>
      <link>https://community.qlik.com/t5/Talend-Studio/log4j-to-a-file/m-p/2326694#M96150</link>
      <description>&lt;P&gt;&lt;A href="https://community.qlik.com/s/profile/00539000005VB67AAG"&gt;@charlesclement&lt;/A&gt;&amp;nbsp;can you please elaborate a little. I added the similar appender to my log4j, but I am not getting the logs in my output file still.&lt;/P&gt;</description>
      <pubDate>Mon, 20 Apr 2020 16:21:46 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/log4j-to-a-file/m-p/2326694#M96150</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-04-20T16:21:46Z</dc:date>
    </item>
  </channel>
</rss>

