IBM Support

The logmsg() method for task and main objects are not displayed in the console log for the Config Editor due to architectural changes.

Question & Answer


Question

The task.logmsg() messages generated by a child Assemblyline via the main.startAL() will not be displayed in the console by default.

Cause

Architectural changes for the Tivoli Directory Integrator 7.x Configuration Editor have modified the log output from version 6.1.1 and 7.x when executed within the Configuration Editor.

Answer

There are differences between the 6.1.1 logging and 7.x logging when executed within the Configuration Editor.

In Tivoli Directory Integrator 6.1.1 the task.logmsg() messages were written to the Configuration Editor console AND the ibmdi.log.

In Tivoli Directory Integrator 7.x the task.logmsg() messages called from a child Assemblyline are not, by default logged to the Configuration Editor console.

For example:

Consider this simple Tivoli Directory Integrator 6.1.1 Configuration:




where WorkerAL1 script Node contains
    task.logmsg(" ---------------------------------------------- ");
    task.logmsg(" TASK.LOGMSG from al = main.startAL ==> WorkerAL1 ");
    task.logmsg(" ---------------------------------------------- ");

Results of Standard run to completion:




Results captured in ibmdi.log (Tivoli Directory Integrator 6.1.1)




The same Assemblyline executed in the Configuration console in V7.x will result in the following:



* Note the absence of the text TASK.LOGMSG from al = main.startAL ==> WorkerAL1


To achieve similar Configuration Editor 6.1.1 behavior in 7.x, the following options are available:


1. To log a message to the console where an IWE is not used, modify the main.startAL() as follows:
      var al=main.startAL("WorkerAL1", task.getLog());

2. To log a message to the console when using a IWE, add the following code block:
        var taskcallblock = task.getTCB();
        taskcallblock.setALSetting("debug", "true");
        var vector = new java.util.Vector();
        vector.add(taskcallblock);
        vector.add(task.getLog());
        var al = main.startAL("WorkerAL1", vector, null);

3. In the log4j.properties, uncomment the example lines to create a logger that logs to the console. Then add your Assemblyline specifics.
**Although this is not the exact behavior, you can see the output in a Console window in the bottom of the Configuration Editor.
        # Here is an example on how to make a logger that logs to the console
        log4j.appender.CONSOLE=org.apache.log4j.ConsoleAppender
        log4j.appender.CONSOLE.layout=org.apache.log4j.PatternLayout
        log4j.appender.CONSOLE.layout.ConversionPattern=%d [%t] %-5p - %m%n0


        log4j.logger.AssemblyLine.AssemblyLines/WorkerAL1=INFO, CONSOLE

[{"Product":{"code":"SSCQGF","label":"Tivoli Directory Integrator"},"Business Unit":{"code":"BU008","label":"Security"},"Component":"General","Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"7.0;7.1;7.1.1;7.2","Edition":"","Line of Business":{"code":"LOB24","label":"Security Software"}}]

Document Information

Modified date:
16 June 2018

UID

swg21512056