Wednesday, September 30, 2015

WebCenter Customer Component Logging


1. Include import java.util.logging.Logger; in customer component class.

2. Create object of Logger class
 private final Logger logger = Logger.getLogger(ComponentManager.class.getName());

3. Add the logs similar to WebCenter Content.
logger.info("<" + new Date().toString()+ "> <Notice> EBSCheckIn Sql Query @ [ "+ selectSQL+" ] - JNDI @ ["+bean.getAxfDataSource()+"]");

Above will work else you need to add following statements in class.

1. Import the handler class - import java.util.logging.Handler;

2. Create object of handler class.
 private Handler consoleHandler = new ConsoleHandler();

3.  Map the handler with logger class.

                         logger.addHandler(consoleHandler);
consoleHandler.setLevel(Level.ALL);
logger.setLevel(Level.ALL);


Try Some Other Patter:-
___________________
1. Import log class

     import intradoc.common.Log;

2.  Add the log info message

Log.info("<" + new Date().toString()+ "> <Notice> EBSCheckIn Sql Query @ [ "+ selectSQL+" ] - JNDI @ ["+bean.getAxfDataSource()+"]");


Try Some thing else :-
___________________

import intradoc.common.Report;

Report.info(section, message, t);

Report.info("filestore", msg, null);

Report.info(null, msg, null);

Report.info("scheduledevents", msg, null);

Report.info("taskmanager", null, ignore);

------------------------------------------

Report.trace("publish", "waiting for publishing thread", ignore);

Report.trace("applet", "MainFrameListener: null command", null);

Report.trace("system", null, excep);

Report.trace("system", "counters or depends is empty", null);

Report.trace("filestore", "adding " + action + " operation to commit log", null);

Report.trace("schemainit", "adding Application target", null);

Report.trace("userstorage", "addAuthData userInfo=" + userInfo + " timeStamp=" + tAuthData.m_timeStamp, null);

  Report.trace("archiver", "Writing export file: " + this.m_archiveDir + "/exports.hda", null);
 
  Report.trace("componentloader", "adding " + dir + " (from " + key + "=" + val + ") to search list", null)
 
   Report.trace("search", "using executable '" + searchExe + "' for searching", null);

No comments:

AWS EC2 - SSH locked with UFW

Need to update the instance's user data: 1. Stop the instance 2. Right click (windows) or ctrl + click (Mac) on the instance to open a c...