How we log a message to a log file using log4j ?

Questions by suri_veeru

Showing Answers 1 - 1 of 1 Answers

Use the Following code for using log4j

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;

  static Log pdLog = null;
  static {
    pdLog = LogFactory.getLog(cm_a001.class);
  }"Information log here ");

pdLog.debug("Debug log here ");

pdLog.error("Error log here ");

by this way you can use the logging messages

This will help you managing your SOPs

--KK :)

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.


Related Answered Questions


Related Open Questions