Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
resumeUtil.addLog("USER_DEF_LOG", "NODE:tWarn_1", "", Thread
.currentThread().getId()
+ "", "WARN", "", "this is a warning", "", "");
tLogCatcher_1.addMessage("tWarn", "tWarn_1", 4,
"this is a warning", 42);
tLogCatcher_1Process(globalMap);
globalMap.put("tWarn_1_WARN_MESSAGES", "this is a warning");
globalMap.put("tWarn_1_WARN_PRIORITY", 4);
globalMap.put("tWarn_1_WARN_CODE", 42);
package routines;
import routines.system.LogCatcherUtils;
import routines.system.ResumeUtil;
public class field_too_long {
/**
* helloExample: not return value, only print "hello" + message.
*
*
* {talendTypes} String
*
* {Category} User Defined
*
* {param} string("world") input: The string need to be printed.
* {param} LogCatcherUtils(tLogCatcher_1) input
* {param} Map(globalMap) input
* {param} ResumeUtil(resumeUtil) input
*
* {example} helloExemple("world") # hello world !.
*/
public static String String_too_long(String field, LogCatcherUtils tLogCatcher_1,final java.util.Map<String, Object> globalMap,ResumeUtil resumeUtil) {
String new_field = field;
String tmp = "";
tmp = field.replaceAll(" +", " ");
new_field = tmp.replaceAll("\t+", "\t");
if(new_field.length()>3){ //You can change it to 4000.
resumeUtil.addLog("USER_DEF_LOG", "NODE:tWarn_1", "", Thread
.currentThread().getId()
+ "", "WARN", "", "this is a warning", "", "");
tLogCatcher_1.addMessage("tWarn", "tWarn_1", 4,
"this is a warning", 42);
}
return new_field;
}
}