App Connect

App Connect

Join this online user group to communicate across IBM product users and experts by sharing advice and best practices with peers and staying up to date regarding product enhancements.

 View Only
  • 1.  Logging in Java Compute Node

    Posted Wed September 22, 2021 10:50 AM
    Hi Team,
                 I have created a message flow using java compute node, have added log4j-1.2.17.jar in build class path and shared-classes. In java compute node, I have hard coded the values logger.info("mesaage"); but in the local directory path I cannot able to see the log file.

    Please find the reference below.
    log4j.properties
    # TRACE < DEBUG < INFO < WARN < ERROR < FATAL
    log4j.rootLogger=DEBUG, toConsole, toFile
    #Console
    log4j.appender.toConsole=org.apache.log4j.ConsoleAppender
    log4j.appender.toConsole.layout=org.apache.log4j.PatternLayout
    log4j.appender.toConsole.layout.ConversionPattern=%d{HH:mm:ss} %5p [%t] - %c.%M - %m%n
    #DailyRollingFile
    log4j.appender.toFile=org.apache.log4j.DailyRollingFileAppender
    log4j.appender.toFile.File=C:\\log\\logging.log
    log4j.appender.toFile.DatePattern='.'yyyy-MM-dd
    log4j.appender.toFile.layout=org.apache.log4j.PatternLayout
    log4j.appender.toFile.layout.ConversionPattern=%d %5p [%t] - %c.%M %L - %m%n

    Java Compute Node:
    Logger log =Logger.getLogger(ValidationMessageFlow_JavaCompute.class);

    log.info("Testing");

    Any suggestions are appreciated, Thanks in advance.

    ------------------------------
    Preethi B V
    ------------------------------


  • 2.  RE: Logging in Java Compute Node

    Posted Wed September 22, 2021 01:58 PM
    Hello,

    check standard system logs - https://www.ibm.com/docs/en/integration-bus/10.0?topic=logs-standard-system - there should be some information about log4j initialization and processing including possible errors. Also I hope that log4j allows you to configure more verbose output using debug mode (https://logging.apache.org/log4j/2.x/faq.html#troubleshooting).

    ------------------------------
    Martin Citron
    Prague
    ------------------------------