List of usage examples for org.apache.commons.logging LogFactory getLog
public static Log getLog(String name)
From source file:com.lambdasoup.panda.PandaTest.java
@BeforeClass public void setup() { log = LogFactory.getLog(PandaTest.class); String accessKey = System.getProperty("panda.accessKey"); String cloudId = System.getProperty("panda.cloudId"); String secretKey = System.getProperty("panda.secretKey"); String apiHost = System.getProperty("panda.apiHost"); panda = new Panda(accessKey, cloudId, secretKey, apiHost); }
From source file:com.lfv.yada.net.server.ServerLogger.java
public ServerLogger(int groupId, String logpath) { // Create a logger for this class if (logpath == null) { logpath = "data/logs/"; }/*from w w w .j av a 2 s . c o m*/ mylogpath = logpath; log = LogFactory.getLog(getClass()); log.info("ServerLogger: logpath=" + logpath); // Create a calendar startTime = System.currentTimeMillis(); calendar = Calendar.getInstance(TimeZone.getTimeZone("UTC")); calendar.setTimeInMillis(startTime); String filename = "Grp" + groupId + "-" + calendar.get(Calendar.YEAR) + s2(calendar.get(Calendar.MONTH) + 1) + s2(calendar.get(Calendar.DAY_OF_MONTH)) + "-" + s2(calendar.get(Calendar.HOUR_OF_DAY)) + s2(calendar.get(Calendar.MINUTE)) + s2(calendar.get(Calendar.SECOND)) + ".log"; try { printer = new PrintStream(new FileOutputStream(logpath + "/" + filename), true); log.info("Creating log " + logpath + "/" + filename); } catch (FileNotFoundException ex) { log.warn("Log file " + filename + " could not be created, logger has been disabled!", ex); printer = null; } }
From source file:com.alfaariss.oa.profile.aselect.binding.BindingFactory.java
/** * Creates the object instance. */ public BindingFactory() { _logger = LogFactory.getLog(BindingFactory.class); }
From source file:com.alfaariss.oa.helper.stylesheet.handler.RedirectHandler.java
/** * Contructor. */ public RedirectHandler() { super(); _logger = LogFactory.getLog(RedirectHandler.class); }
From source file:io.smartspaces.api.system.internal.osgi.Log4jLoggingProvider.java
@Override public Log getLog(String logName, String level, String filename) { Log log = LogFactory.getLog("smartspaces." + logName); return log; }
From source file:net.arnx.jsonic.web.extension.SpringContainer.java
@Override public void init(HttpServlet servlet) throws ServletException { super.init(servlet); this.log = LogFactory.getLog(servlet.getClass()); appContext = WebApplicationContextUtils.getWebApplicationContext(context); }
From source file:edu.vt.middleware.ldap.ssl.TLSSocketFactory.java
/** * This returns the default SSL socket factory. * * @return <code>SocketFactory</code> *//* www .ja va 2 s . co m*/ public static SocketFactory getDefault() { final TLSSocketFactory sf = new TLSSocketFactory(); try { sf.initialize(); } catch (GeneralSecurityException e) { final Log logger = LogFactory.getLog(TLSSocketFactory.class); if (logger.isErrorEnabled()) { logger.error("Error initializing socket factory", e); } } return sf; }
From source file:epgtools.loggerfactory.LoggerFactory.java
public Log getLOG() { final Log LOG; if (this.outLog) { LOG = LogFactory.getLog(myClass); } else {/*from w w w .j av a 2s . c o m*/ LOG = new NoOpLog(); THIS_LOG.info(myClass + "????"); } return LOG; }
From source file:fr.calamus.common.db.core.EntitiesAccess.java
public EntitiesAccess(String table, DbAccess dba) { log = LogFactory.getLog(getClass()); this.table = table; this.dba = dba; maxLines = 0; }
From source file:de.kopis.glacier.util.VaultInventoryPrinter.java
public VaultInventoryPrinter() { log = LogFactory.getLog(VaultInventoryPrinter.class); }