very possible.
first you need to use a tLog4jInit to create your logger object. Look at the generated code to get the name of the object.
once you have the object, you can send log messages to it directly in code by:
<logger_name>.info("this is an info message");
Thanks Shong.
I downloaded the Revision 1.3 of tLog4J component and extracted the ZIP file. from my TDQ studio window->preferences->Talend->Components. I added the unzipped folder as UserComponents, also in tLog4J_java.xml updated the Family, restarted the studio. but I don't see the new component added to the palette. is I'm missing any thing in installing this component???
<FAMILIES>
<FAMILY>Logs_Errors</FAMILY>
<FAMILY>Logs_Errors/Log4J</FAMILY>
</FAMILIES>
after placing the log4j directory in \plugins\org.talend.designer.components.localprovider_<version>\components I can see the log4J component available in Palette. Thanks
I have 1400 lines of Java code written in tJava component
. how to add a logger in that code? is it possible?
very possible.
first you need to use a tLog4jInit to create your logger object. Look at the generated code to get the name of the object.
once you have the object, you can send log messages to it directly in code by:
<logger_name>.info("this is an info message");