List of usage examples for org.apache.commons.logging Log debug
void debug(Object message);
From source file:org.picocontainer.gems.monitors.CommonsLoggingComponentMonitor.java
/** {@inheritDoc} **/ public Object invoking(final PicoContainer container, final ComponentAdapter<?> componentAdapter, final Member member, final Object instance, final Object[] args) { Log log = getLog(member); if (log.isDebugEnabled()) { log.debug(ComponentMonitorHelper.format(ComponentMonitorHelper.INVOKING, memberToString(member), instance));//from ww w . j av a2s . c o m } return delegate.invoking(container, componentAdapter, member, instance, args); }
From source file:org.picocontainer.gems.monitors.CommonsLoggingComponentMonitor.java
/** {@inheritDoc} **/ public void invoked(final PicoContainer container, final ComponentAdapter<?> componentAdapter, final Member member, final Object instance, final long duration, final Object[] args, final Object retVal) { Log log = getLog(member); if (log.isDebugEnabled()) { log.debug(ComponentMonitorHelper.format(ComponentMonitorHelper.INVOKED, methodToString(member), instance, duration));//from ww w . j av a2s. co m } delegate.invoked(container, componentAdapter, member, instance, duration, args, retVal); }
From source file:org.programmatori.domotica.own.sdk.config.AbstractConfig.java
/** * Give the home of the project. <br> * For return the home of the project need to have a file in the home * * @return path of home directory/* ww w. j a v a 2 s. c om*/ * @deprecated */ public static String getOldHomeDirectory(String fileName) throws Exception { String home = ""; String separator = File.separator; boolean first = true; try { Log log = LogFactory.getLog(AbstractConfig.class); // for solve bug in the jar use a real file instead a "." String filePath = null; // check presence of "filename", if it isn't raise an Exception filePath = ClassLoader.getSystemResource(fileName).toString(); log.debug("Path of " + fileName + ": " + filePath); StringTokenizer st = new StringTokenizer(filePath, "/"); // URI Separator st.nextToken(); // don't calculate "file:" while (st.hasMoreTokens()) { String folder = st.nextToken(); log.debug("Foledr: " + folder); // BUG Linux starting slash if (separator.equals("/") && first) { folder = separator + folder; first = false; } // BUG Eclipse put in the bin boolean bBin = !(folder.equals("bin") && (st.countTokens() < 2)); // BUG jar can not support . then use a real file for find a path boolean bRealFile = !(folder.equals(fileName) && (st.countTokens() < 1)); // BUG the home directory it cannot end with .jar boolean bJar = !(folder.endsWith(".jar!") && (st.countTokens() < 2)); if (bBin && bRealFile && bJar) { // If i build under bin i don't insert in // home path if (home.length() > 0) home += "/"; home = home + folder; log.debug("home: " + home); } } } catch (Exception e) { throw new Exception("File " + fileName + " must be present, please ensure it exists "); } return home; }
From source file:org.programmatori.domotica.own.sdk.config.AbstractConfig.java
private static String getPathFromString(String path) { Log log = LogFactory.getLog(AbstractConfig.class); String separator = File.separator; boolean first = true; String home = ""; log.debug("Path " + path); StringTokenizer st = new StringTokenizer(path, "/"); // URI Separator //st.nextToken(); // don't calculate "file:" while (st.hasMoreTokens()) { String folder = st.nextToken(); log.debug("Foledr: " + folder); boolean bFile = !(folder.equals("file:")); // BUG Linux starting slash if (separator.equals("/") && first) { folder = separator + folder; first = false;/* w ww .ja v a 2 s . c om*/ } // BUG Eclipse put in the bin boolean bBin = !(folder.equals("bin") && (st.countTokens() < 2)); // BUG jar can not support . then use a real file for find a path //boolean bRealFile = !(folder.equals(fileName) && (st.countTokens() < 1)); boolean bRealFile = true; // BUG the home directory it cannot end with .jar boolean bJar = !(folder.endsWith(".jar!") && (st.countTokens() < 2)); if (bBin && bRealFile && bJar && bFile) { // If i build under bin i don't insert in // home path if (home.length() > 0) home += "/"; home = home + folder; log.debug("home: " + home); } } return home; }
From source file:org.qedeq.base.trace.Trace.java
/** * Trace object./* w ww . j av a2s . co m*/ * @param tracingClass Class that wants to make a trace entry. * @param tracingObject Instance that wants to make a trace entry. * @param method Method of that object. * @param object Object to trace. */ public static void trace(final Class tracingClass, final Object tracingObject, final String method, final Object object) { if (traceOn) { final Log log = LogFactory.getFactory().getInstance(tracingClass); if (log.isDebugEnabled()) { log.debug("." + method + " " + object); } } }
From source file:org.qedeq.base.trace.Trace.java
/** * Trace object./*from w w w .ja va2s.co m*/ * * @param tracingClass Class that wants to make a trace entry. * @param method Method of that class. * @param object Object to trace. */ public static void trace(final Class tracingClass, final String method, final Object object) { if (traceOn) { final Log log = LogFactory.getFactory().getInstance(tracingClass); if (log.isDebugEnabled()) { log.debug("." + method + " " + object); } } }
From source file:org.qedeq.base.trace.Trace.java
/** * Trace method begin. Should be followed by an analogous * {@link #end(Class, Object, String)} call. * * @param tracingClass Class that wants to make a trace entry. * @param tracingObject Instance that wants to make a trace entry. * @param method Method of that object. *//*from ww w . j a v a 2 s. c o m*/ public static void begin(final Class tracingClass, final Object tracingObject, final String method) { if (traceOn) { final Log log = LogFactory.getFactory().getInstance(tracingClass); if (log.isDebugEnabled()) { log.debug("." + method + " " + "begin"); } } }
From source file:org.qedeq.base.trace.Trace.java
/** * Trace method begin. Should be followed by an analogous {@link #end(Class, String)} call. * * @param tracingClass Class that wants to make a trace entry. * @param method Method of that class. *///from w w w . ja v a 2s .c o m public static void begin(final Class tracingClass, final String method) { if (traceOn) { final Log log = LogFactory.getFactory().getInstance(tracingClass); if (log.isDebugEnabled()) { log.debug("." + method + " " + "begin"); } } }
From source file:org.qedeq.base.trace.Trace.java
/** * Trace method end./*w w w . j a v a2s . c o m*/ * * @param tracingClass Class that wants to make a trace entry. * @param tracingObject Instance that wants to make a trace entry. * @param method Method of that object. */ public static void end(final Class tracingClass, final Object tracingObject, final String method) { if (traceOn) { final Log log = LogFactory.getFactory().getInstance(tracingClass); if (log.isDebugEnabled()) { log.debug("." + method + " " + "end"); } } }
From source file:org.qedeq.base.trace.Trace.java
/** * Trace method end.//from ww w . j av a 2 s .c om * * @param tracingClass Class that wants to make a trace entry. * @param method Method of that class. */ public static void end(final Class tracingClass, final String method) { if (traceOn) { final Log log = LogFactory.getFactory().getInstance(tracingClass); if (log.isDebugEnabled()) { log.debug("." + method + " " + "end"); } } }