List of usage examples for org.apache.commons.logging LogFactory getLog
public static Log getLog(String name)
From source file:au.com.shawware.sandbox.persistence.AbstractRepositoryTest.java
/** * Default constructor. Setup the basics. */ public AbstractRepositoryTest() { super(); mLog = LogFactory.getLog(AbstractRepositoryTest.class.getName()); }
From source file:com.mysql.jdbc.log.CommonsLogger.java
public CommonsLogger(String instanceName) { logger = LogFactory.getLog(instanceName); }
From source file:fr.aliasource.webmail.folder.ActionDeleteFolderAction.java
public ActionDeleteFolderAction() { logger = LogFactory.getLog(getClass()); ac = new AccountConfiguration(); }
From source file:com.mellisuga.processing.RunningLoggerImpl.java
public RunningLoggerImpl(Class<?> clazz) { _log = LogFactory.getLog(clazz); }
From source file:com.alibaba.druid.support.logging.JakartaCommonsLoggingImpl.java
public JakartaCommonsLoggingImpl(String loggerName) { log = LogFactory.getLog(loggerName); }
From source file:com.tanist.quartz.SimpleExample.java
public void run() throws Exception { Log log = LogFactory.getLog(SimpleExample.class); log.info("------- Initializing ----------------------"); // First we must get a reference to a scheduler SchedulerFactory sf = new StdSchedulerFactory(); Scheduler sched = sf.getScheduler(); log.info("------- Initialization Complete -----------"); log.info("------- Scheduling Jobs -------------------"); // computer a time that is on the next round minute Date runTime = TriggerUtils.getEvenMinuteDate(new Date()); // define the job and tie it to our HelloJob class JobDetail job = new JobDetail("job1", "group1", HelloJob.class); // Trigger the job to run on the next round minute SimpleTrigger trigger = new SimpleTrigger("trigger1", "group1", runTime); // Tell quartz to schedule the job using our trigger sched.scheduleJob(job, trigger);//from ww w. j a v a 2 s . c o m log.info(job.getFullName() + " will run at: " + runTime); // Start up the scheduler (nothing can actually run until the // scheduler has been started) sched.start(); log.info("------- Started Scheduler -----------------"); // wait long enough so that the scheduler as an opportunity to // run the job! log.info("------- Waiting 90 seconds... -------------"); try { // wait 90 seconds to show jobs Thread.sleep(90L * 1000L); // executing... } catch (Exception e) { } // shut down the scheduler log.info("------- Shutting Down ---------------------"); sched.shutdown(true); log.info("------- Shutdown Complete -----------------"); }
From source file:fr.aliasource.webmail.message.MoveMessageAction.java
public MoveMessageAction() { this.logger = LogFactory.getLog(getClass()); }
From source file:com.ngdata.sep.util.io.Closer.java
public static void close(Object object) { if (object != null) { try {//from w ww .jav a2 s . c o m Method closeMethod = null; Method[] methods = object.getClass().getMethods(); for (Method method : methods) { if (method.getParameterTypes().length == 0) { if (method.getName().equals("close")) { closeMethod = method; break; } else if (method.getName().equals("shutdown")) { closeMethod = method; } else if (method.getName().equals("stop")) { closeMethod = method; } } } if (closeMethod != null) { closeMethod.invoke(object); } else { Log log = LogFactory.getLog(Closer.class); log.error("Do not know how to close object of type " + object.getClass().getName()); } } catch (Throwable t) { Log log = LogFactory.getLog(Closer.class); log.error("Error closing object of type " + object.getClass().getName(), t); } } }
From source file:fr.aliasource.webmail.book.GetContactsAction.java
public GetContactsAction() { logger = LogFactory.getLog(getClass()); }
From source file:net.sf.hajdbc.logging.commons.CommonsLogger.java
public CommonsLogger(Class<?> targetClass) { this.log = LogFactory.getLog(targetClass); }