Sample Service call-out log4j output

Posted by nuri.besen on 08-Apr-2015 23:03

I was examining the sample service call-out that comes with 5.4.1.3 and it outputs log4j debug messages.

When I tried to use the same technique, I could not find where the output is sent to from within Studio,

To make sure that log4j would output, ı used the ERROR level. I also tried to use the

System.out.println()

but could not see that in the console of Eclipse either.

Where do these output go to? Which Jar contains the log4j.xml/properties for config? Can I include my own log4j config?

Posted by Prashant Thumma on 14-Apr-2015 08:06

Hi Nuri,

By default the log4j setup outputs to the standard output at error level.  Unfortunately this is the standard output for the eclipse process and can't be seen inside eclipse.

The best approach of logging from service call outs is to change the log4j appender and the logging level.  This can be done using the following steps:

  1. Shutdown Corticon studio.
  2. Navigate to the com.corticon.thirdparty_5.4.0.0 plugin directory in the installation (normal installation this is located at C:\Program Files\Progress\Corticon 5.4\Studio\eclipse\plugins\com.corticon.thirdparty_5.4.0.0).
  3. Modify the log4j.properties file to customize the appenders and log4j log levels.  e.g.

log4j.appender.file=org.apache.log4j.FileAppender
log4j.appender.file.File=c:/wrk/corticon.log4j.log
log4j.appender.file.layout=org.apache.log4j.PatternLayout
log4j.appender.file.layout.ConversionPattern=%d{ABSOLUTE} %5p %c{1}:%L - %m%n
log4j.rootLogger=debug, file


When you restart Corticon studio the service call out logs go to the file specified in the configuration.

-Prashant

All Replies

Posted by James Arsenault on 14-Apr-2015 06:15

Nuri, sorry for the delay. We'll get back to you on this shortly.

Jim

Posted by Prashant Thumma on 14-Apr-2015 08:06

Hi Nuri,

By default the log4j setup outputs to the standard output at error level.  Unfortunately this is the standard output for the eclipse process and can't be seen inside eclipse.

The best approach of logging from service call outs is to change the log4j appender and the logging level.  This can be done using the following steps:

  1. Shutdown Corticon studio.
  2. Navigate to the com.corticon.thirdparty_5.4.0.0 plugin directory in the installation (normal installation this is located at C:\Program Files\Progress\Corticon 5.4\Studio\eclipse\plugins\com.corticon.thirdparty_5.4.0.0).
  3. Modify the log4j.properties file to customize the appenders and log4j log levels.  e.g.

log4j.appender.file=org.apache.log4j.FileAppender
log4j.appender.file.File=c:/wrk/corticon.log4j.log
log4j.appender.file.layout=org.apache.log4j.PatternLayout
log4j.appender.file.layout.ConversionPattern=%d{ABSOLUTE} %5p %c{1}:%L - %m%n
log4j.rootLogger=debug, file


When you restart Corticon studio the service call out logs go to the file specified in the configuration.

-Prashant

This thread is closed