<?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: Logs in the routines in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/Logs-in-the-routines/m-p/2364480#M128218</link>
    <description>Hi,&amp;nbsp;&lt;BR /&gt;I get the same trouble here. When not using&amp;nbsp;&lt;FONT size="1"&gt;&lt;FONT face="Verdana, Helvetica, Arial, sans-serif"&gt;tLogCatcher_1Process(globalMap)&lt;/FONT&gt;&lt;/FONT&gt;&amp;nbsp;in the routine, it seems the log is not pushed to the tLogCatcher. But when I try to add it to the routine, I get a compilation error :&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;FONT color="#ff2600"&gt;&lt;FONT size="1"&gt;&lt;FONT face="Courier"&gt;The method tLogCatcher_1Process(Map&amp;lt;String,Object&amp;gt;) is undefined for the type MyClass&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;BR /&gt;Thank you in advance for your help.&lt;BR /&gt;p.p1 {margin: 0.0px 0.0px 0.0px 0.0px; font: 10.0px Courier; color: #ff2600}</description>
    <pubDate>Fri, 10 Feb 2017 15:50:32 GMT</pubDate>
    <dc:creator>hanoijolly</dc:creator>
    <dc:date>2017-02-10T15:50:32Z</dc:date>
    <item>
      <title>Logs in the routines</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Logs-in-the-routines/m-p/2364475#M128213</link>
      <description>Hi,
&lt;BR /&gt;I want to log into a java routine. I work with the enterprise edition an my job is in java.
&lt;BR /&gt;I have a joblet which create the file log with a specific schema (Cf log.png).
&lt;BR /&gt;How can I write a message in my java routine like a twarn component ?
&lt;BR /&gt;
&lt;BR /&gt;Thank you,
&lt;BR /&gt;Carole</description>
      <pubDate>Wed, 28 Mar 2012 15:22:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Logs-in-the-routines/m-p/2364475#M128213</guid>
      <dc:creator>param75</dc:creator>
      <dc:date>2012-03-28T15:22:43Z</dc:date>
    </item>
    <item>
      <title>Re: Logs in the routines</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Logs-in-the-routines/m-p/2364476#M128214</link>
      <description>Hi Carole
&lt;BR /&gt;I don't know what's your routine like.
&lt;BR /&gt;But you can add these code in tJava or your routine.
&lt;BR /&gt;
&lt;PRE&gt;resumeUtil.addLog("USER_DEF_LOG", "NODE:tWarn_1", "", Thread&lt;BR /&gt;						.currentThread().getId()&lt;BR /&gt;						+ "", "WARN", "", "this is a warning", "", "");&lt;BR /&gt;				tLogCatcher_1.addMessage("tWarn", "tWarn_1", 4,&lt;BR /&gt;						"this is a warning", 42);&lt;BR /&gt;				tLogCatcher_1Process(globalMap);&lt;BR /&gt;				globalMap.put("tWarn_1_WARN_MESSAGES", "this is a warning");&lt;BR /&gt;				globalMap.put("tWarn_1_WARN_PRIORITY", 4);&lt;BR /&gt;				globalMap.put("tWarn_1_WARN_CODE", 42);&lt;/PRE&gt;
&lt;BR /&gt;One more thing. The unique name of tLogCatcher can't be changed automatically(e.g. tLogCatcher_2).
&lt;BR /&gt;But always it is tLogCatcher_1.
&lt;BR /&gt;Regards,
&lt;BR /&gt;Pedro</description>
      <pubDate>Thu, 29 Mar 2012 03:35:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Logs-in-the-routines/m-p/2364476#M128214</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2012-03-29T03:35:52Z</dc:date>
    </item>
    <item>
      <title>Re: Logs in the routines</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Logs-in-the-routines/m-p/2364477#M128215</link>
      <description>Hi Pedro,&lt;BR /&gt;Thank you for the answer. I put it in my routine but I have declarations problem.&lt;BR /&gt;resumeUtil : can't be resolved&lt;BR /&gt;tLogCatcher_1 : can't be resolved&lt;BR /&gt;globalMap : can't be resolved as a variable&lt;BR /&gt;globalMap : can't be resolved&lt;BR /&gt;globalMap : can't be resolved&lt;BR /&gt;globalMap : can't be resolved&lt;BR /&gt;The routine doesn't have a lot of code. I verify the length of a field and I reset it with empty value if it's &amp;gt; 4000.&lt;BR /&gt;I want to log when I reset the field.&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;Carole</description>
      <pubDate>Thu, 29 Mar 2012 13:29:13 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Logs-in-the-routines/m-p/2364477#M128215</guid>
      <dc:creator>param75</dc:creator>
      <dc:date>2012-03-29T13:29:13Z</dc:date>
    </item>
    <item>
      <title>Re: Logs in the routines</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Logs-in-the-routines/m-p/2364478#M128216</link>
      <description>Hi
&lt;BR /&gt;If you want to define a perfect method, we need to use Java reflection, which will make it so complicated.
&lt;BR /&gt;Here is a custom routine for your requirement in a simple way.
&lt;BR /&gt;
&lt;PRE&gt;package routines;&lt;BR /&gt;import routines.system.LogCatcherUtils;&lt;BR /&gt;import routines.system.ResumeUtil;&lt;BR /&gt;public class field_too_long {&lt;BR /&gt;    /**&lt;BR /&gt;     * helloExample: not return value, only print "hello" + message.&lt;BR /&gt;     * &lt;BR /&gt;     * &lt;BR /&gt;     * {talendTypes} String&lt;BR /&gt;     * &lt;BR /&gt;     * {Category} User Defined&lt;BR /&gt;     * &lt;BR /&gt;     * {param} string("world") input: The string need to be printed.&lt;BR /&gt;     * {param} LogCatcherUtils(tLogCatcher_1) input&lt;BR /&gt;     * {param} Map(globalMap) input&lt;BR /&gt;     * {param} ResumeUtil(resumeUtil) input&lt;BR /&gt;     * &lt;BR /&gt;     * {example} helloExemple("world") # hello world !.&lt;BR /&gt;     */&lt;BR /&gt;    public static String String_too_long(String field, LogCatcherUtils tLogCatcher_1,final java.util.Map&amp;lt;String, Object&amp;gt; globalMap,ResumeUtil resumeUtil) {&lt;BR /&gt;    	String new_field = field;&lt;BR /&gt;    	String tmp = "";&lt;BR /&gt;    	tmp = field.replaceAll(" +", " ");&lt;BR /&gt;    	new_field = tmp.replaceAll("\t+", "\t");&lt;BR /&gt;    	if(new_field.length()&amp;gt;3){    //You can change it to 4000.&lt;BR /&gt;    	resumeUtil.addLog("USER_DEF_LOG", "NODE:tWarn_1", "", Thread&lt;BR /&gt;                .currentThread().getId()&lt;BR /&gt;                + "", "WARN", "", "this is a warning", "", "");&lt;BR /&gt;        tLogCatcher_1.addMessage("tWarn", "tWarn_1", 4,&lt;BR /&gt;                "this is a warning", 42);&lt;BR /&gt;    	}&lt;BR /&gt;        return new_field;&lt;BR /&gt;    }	&lt;BR /&gt;}&lt;/PRE&gt;
&lt;BR /&gt;Regards,
&lt;BR /&gt;Pedro</description>
      <pubDate>Thu, 29 Mar 2012 16:40:02 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Logs-in-the-routines/m-p/2364478#M128216</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2012-03-29T16:40:02Z</dc:date>
    </item>
    <item>
      <title>Re: Logs in the routines</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Logs-in-the-routines/m-p/2364479#M128217</link>
      <description>Hi,&lt;BR /&gt;I still have errors of compilation. It's certainly due to the using of joblet. &lt;BR /&gt;In my tmap, i had put : &lt;BR /&gt;too_long.field_too_long(row1.Column1,tLogCatcher_1,globalMap,resumeUtil);&lt;BR /&gt;tLogCatcher_1Process(globalMap)&lt;BR /&gt;Is it good ? Have I to don't use joblet for the log ? &lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;Carole</description>
      <pubDate>Mon, 02 Apr 2012 10:38:56 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Logs-in-the-routines/m-p/2364479#M128217</guid>
      <dc:creator>param75</dc:creator>
      <dc:date>2012-04-02T10:38:56Z</dc:date>
    </item>
    <item>
      <title>Re: Logs in the routines</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Logs-in-the-routines/m-p/2364480#M128218</link>
      <description>Hi,&amp;nbsp;&lt;BR /&gt;I get the same trouble here. When not using&amp;nbsp;&lt;FONT size="1"&gt;&lt;FONT face="Verdana, Helvetica, Arial, sans-serif"&gt;tLogCatcher_1Process(globalMap)&lt;/FONT&gt;&lt;/FONT&gt;&amp;nbsp;in the routine, it seems the log is not pushed to the tLogCatcher. But when I try to add it to the routine, I get a compilation error :&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;FONT color="#ff2600"&gt;&lt;FONT size="1"&gt;&lt;FONT face="Courier"&gt;The method tLogCatcher_1Process(Map&amp;lt;String,Object&amp;gt;) is undefined for the type MyClass&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;BR /&gt;Thank you in advance for your help.&lt;BR /&gt;p.p1 {margin: 0.0px 0.0px 0.0px 0.0px; font: 10.0px Courier; color: #ff2600}</description>
      <pubDate>Fri, 10 Feb 2017 15:50:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Logs-in-the-routines/m-p/2364480#M128218</guid>
      <dc:creator>hanoijolly</dc:creator>
      <dc:date>2017-02-10T15:50:32Z</dc:date>
    </item>
  </channel>
</rss>

