How can we create log entries in the Java code of my Custom Task? Can we use a common log file for both the within an IM Process flow and the Custom Task?

How can we create log entries in the Java code of my Custom Task? Can we use a common log file for both the within an IM Process flow and the Custom Task?

book

Article ID: KB0088560

calendar_today

Updated On:

Products Versions
TIBCO IntegrationManager -
Not Applicable -

Description

Resolution:
We can use a common log file for both within the IM Process flow and the Custom Task.

Using IM Property Editory set the following Properties under “Trace” tab –
Activate Script tracing – true
Log directory for script trace – errlog
Maximum log size -
Maximum number of log files –
Prefix for task log files - testLog

And use the following job method to log in your process diagram -
job.trace("your message");

And use the following line within your Custom Task -
PrintWriter trace = com.tibco.im.wf.JobPoolConfigurator.sharedTrace;
trace.println("mesage within the Custom Task");
trace.flush();

Both these message will be logged in the "testLog" file in the "errlog" directory.

The dat file, the Properties.cfg and the CustomTask (MyTask.java)  file is attached for reference.

Environment

Product: TIBCO IntegrationManager Version: 4.1.0 OS: All --------------------

Issue/Introduction

How can we create log entries in the Java code of my Custom Task? Can we use a common log file for both the within an IM Process flow and the Custom Task?

Attachments

How can we create log entries in the Java code of my Custom Task? Can we use a common log file for both the within an IM Process flow and the Custom Task? get_app