Package org.apache.commons.logging

Examples of org.apache.commons.logging.Log


                    date = null;
                }
            }
        } catch (ParseException e) {
            // Bad date so return null
            Log log = LogFactory.getLog(GenericTypeValidator.class);
            if (log.isDebugEnabled()) {
                log.debug("Date parse failed value=[" + value       + "], " +
                                          "pattern=[" + datePattern + "], " +
                                           "strict=[" + strict      + "] "  + e);
            }
        }
View Full Code Here


            formatter.setLenient(false);

            date = formatter.parse(value);
        } catch (ParseException e) {
            // Bad date so return null
            Log log = LogFactory.getLog(GenericTypeValidator.class);
            if (log.isDebugEnabled()) {
                log.debug("Date parse failed value=[" + value  + "], " +
                                           "locale=[" + locale + "] "  + e);
            }
        }

        return date;
View Full Code Here

        try {
            value = PropertyUtils.getProperty(bean, property);

        } catch(IllegalAccessException e) {
            Log log = LogFactory.getLog(ValidatorUtils.class);
            log.error(e.getMessage(), e);
        } catch(InvocationTargetException e) {
            Log log = LogFactory.getLog(ValidatorUtils.class);
            log.error(e.getMessage(), e);
        } catch(NoSuchMethodException e) {
            Log log = LogFactory.getLog(ValidatorUtils.class);
            log.error(e.getMessage(), e);
        }

        if (value == null) {
            return null;
        }
View Full Code Here

        }
    }

    private void logEnvInfo() {
       try {
          Log log = LogFactory.getLog(Log4jService.class);
          log.info("----------------------------------------------");
          log.info("Started Logging Service");
          log.debug("Log4jService created with configFileName=" + this.configurationFile +
                    ", refreshPeriodSeconds=" + this.refreshPeriod);
          log.info("Runtime Information:");
          log.info("  Install Directory = " + DirectoryUtils.getGeronimoInstallDirectory().toString());
          log.info("  JVM in use = " + System.getProperty("java.vendor") + " Java " + System.getProperty("java.version"));
          log.info("Java Information:");
          log.info("  System property [java.runtime.name]  = " + System.getProperty("java.runtime.name"));
          log.info("  System property [java.runtime.version]  = " + System.getProperty("java.runtime.version"));
          log.info("  System property [os.name]             = " + System.getProperty("os.name"));
          log.info("  System property [os.version]          = " + System.getProperty("os.version"));
          log.info("  System property [sun.os.patch.level]  = " + System.getProperty("sun.os.patch.level"));
          log.info("  System property [os.arch]             = " + System.getProperty("os.arch"));
          log.info("  System property [java.class.version]  = " + System.getProperty("java.class.version"));
          log.info("  System property [locale]              = " + System.getProperty("user.language") + "_" + System.getProperty("user.country"));
          log.info("  System property [unicode.encoding]    = " + System.getProperty("sun.io.unicode.encoding"));
          log.info("  System property [file.encoding]       = " + System.getProperty("file.encoding"));
          log.info("  System property [java.vm.name]        = " + System.getProperty("java.vm.name"));
          log.info("  System property [java.vm.vendor]      = " + System.getProperty("java.vm.vendor"));
          log.info("  System property [java.vm.version]     = " + System.getProperty("java.vm.version"));
          log.info("  System property [java.vm.info]        = " + System.getProperty("java.vm.info"));
          log.info("  System property [java.home]           = " + System.getProperty("java.home"));
          log.info("  System property [java.classpath]      = " + System.getProperty("java.classpath"));
          log.info("  System property [java.library.path]   = " + System.getProperty("java.library.path"));
          log.info("  System property [java.endorsed.dirs]  = " + System.getProperty("java.endorsed.dirs"));
          log.info("  System property [java.ext.dirs]       = " + System.getProperty("java.ext.dirs"));
          log.info("  System property [sun.boot.class.path] = " + System.getProperty("sun.boot.class.path"));
          log.info("----------------------------------------------");
       } catch (Exception e) {
          System.err.println("Exception caught during logging of Runtime Information.  Exception=" + e.toString());
       }
    }
View Full Code Here

   
    public final static String HEADER_LOG_ID = "org.apache.synapse.transport.nhttp.headers";
    public final static String WIRE_LOG_ID = "org.apache.synapse.transport.nhttp.wire";

    public static IOSession decorate(IOSession session, final String id) {
        Log log = LogFactory.getLog(session.getClass());
        Log wirelog = LogFactory.getLog(WIRE_LOG_ID);
        if (wirelog.isDebugEnabled() || log.isDebugEnabled()) {
            session = new LoggingIOSession(log, wirelog, session, id);
        }
        return session;
    }
View Full Code Here

        }
        return session;
    }
   
    public static NHttpClientHandler decorate(NHttpClientHandler handler) {
        Log log = LogFactory.getLog(handler.getClass());
        if (log.isDebugEnabled()) {
            handler = new LoggingNHttpClientHandler(log, handler);
        }
        return handler;
    }
View Full Code Here

        }
        return handler;
    }

    public static NHttpServiceHandler decorate(NHttpServiceHandler handler) {
        Log log = LogFactory.getLog(handler.getClass());
        if (log.isDebugEnabled()) {
            handler = new LoggingNHttpServiceHandler(log, handler);
        }
        return handler;
    }
View Full Code Here

    public static NHttpClientIOTarget createClientConnection(
            final IOSession iosession,
            final HttpResponseFactory responseFactory,
            final ByteBufferAllocator allocator,
            final HttpParams params) {
        Log log = LogFactory.getLog(DefaultNHttpClientConnection.class);
        Log headerlog = LogFactory.getLog(HEADER_LOG_ID);       
        if (headerlog.isDebugEnabled() || log.isDebugEnabled()) {
            return new LoggingNHttpClientConnection(
                    log,
                    headerlog,
                    iosession,
                    responseFactory,
View Full Code Here

    public static NHttpServerIOTarget createServerConnection(
            final IOSession iosession,
            final HttpRequestFactory requestFactory,
            final ByteBufferAllocator allocator,
            final HttpParams params) {
        Log log = LogFactory.getLog(DefaultNHttpClientConnection.class);
        Log headerlog = LogFactory.getLog(HEADER_LOG_ID);       
        if (headerlog.isDebugEnabled() || log.isDebugEnabled()) {
            return new LoggingNHttpServerConnection(
                    log,
                    headerlog,
                    iosession,
                    requestFactory,
View Full Code Here

        StatisticsReporter.reportForComponent(synCtx,
                proxy.getAspectConfiguration(),
                ComponentType.PROXYSERVICE);
       
        // get service log for this message and attach to the message context also set proxy name
        Log serviceLog = LogFactory.getLog(SynapseConstants.SERVICE_LOGGER_PREFIX + name);
        ((Axis2MessageContext) synCtx).setServiceLog(serviceLog);

        synCtx.setProperty(SynapseConstants.PROXY_SERVICE, name);
        synCtx.setTracingState(proxy.getTraceState());
View Full Code Here

TOP

Related Classes of org.apache.commons.logging.Log

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.