Package org.apache.cocoon.util.log

Examples of org.apache.cocoon.util.log.Log4JConfigurator


            }

            // let's configure log4j
            final String log4jConfig = getInitParameter("log4j-config", null);
            if ( log4jConfig != null ) {
                final Log4JConfigurator configurator = new Log4JConfigurator(subcontext);

                // test if this is a qualified url
                InputStream is = null;
                if ( log4jConfig.indexOf(':') == -1) {
                    is = this.servletContext.getResourceAsStream(log4jConfig);
                    if (is == null) is = new FileInputStream(log4jConfig);
                } else {
                    final URL log4jURL = new URL(log4jConfig);
                    is = log4jURL.openStream();
                }
                configurator.doConfigure(is, LogManager.getLoggerRepository());
            }

            ContainerUtil.initialize(loggerManager);
        } catch (Exception e) {
            errorHandler.error("Could not set up Cocoon Logger, will use screen instead", e, null);
View Full Code Here


            }

            // let's configure log4j
            final String log4jConfig = getInitParameter("log4j-config", null);
            if ( log4jConfig != null ) {
                final Log4JConfigurator configurator = new Log4JConfigurator(subcontext);

                // test if this is a qualified url
                InputStream is = null;
                if ( log4jConfig.indexOf(':') == -1) {
                    is = this.portletContext.getResourceAsStream(log4jConfig);
                    if (is == null) is = new FileInputStream(log4jConfig);
                } else {
                    final URL log4jURL = new URL(log4jConfig);
                    is = log4jURL.openStream();
                }
                configurator.doConfigure(is, LogManager.getLoggerRepository());
            }

            ContainerUtil.initialize(loggerManager);
        } catch (Exception e) {
            errorHandler.error("Could not set up Cocoon Logger, will use screen instead", e, null);
View Full Code Here

            }

            // let's configure log4j
            final String log4jConfig = getInitParameter("log4j-config", null);
            if ( log4jConfig != null ) {
                final Log4JConfigurator configurator = new Log4JConfigurator(subcontext);

                // test if this is a qualified url
                InputStream is = null;
                if ( log4jConfig.indexOf(':') == -1) {
                    is = this.servletContext.getResourceAsStream(log4jConfig);
                    if (is == null) is = new FileInputStream(log4jConfig);
                } else {
                    final URL log4jURL = new URL(log4jConfig);
                    is = log4jURL.openStream();
                }
                configurator.doConfigure(is, LogManager.getLoggerRepository());
            }

            ContainerUtil.initialize(loggerManager);
        } catch (Exception e) {
            errorHandler.error("Could not set up Cocoon Logger, will use screen instead", e, null);
View Full Code Here

            }

            // let's configure log4j
            final String log4jConfig = getInitParameter("log4j-config", null);
            if ( log4jConfig != null ) {
                final Log4JConfigurator configurator = new Log4JConfigurator(subcontext);

                // test if this is a qualified url
                InputStream is = null;
                if ( log4jConfig.indexOf(':') == -1) {
                    is = this.servletContext.getResourceAsStream(log4jConfig);
                    if (is == null) is = new FileInputStream(log4jConfig);
                } else {
                    final URL log4jURL = new URL(log4jConfig);
                    is = log4jURL.openStream();
                }
                configurator.doConfigure(is, LogManager.getLoggerRepository());
            }

            ContainerUtil.initialize(loggerManager);
        } catch (Exception e) {
            errorHandler.error("Could not set up Cocoon Logger, will use screen instead", e, null);
View Full Code Here

            }

            // let's configure log4j
            final String log4jConfig = getInitParameter("log4j-config", null);
            if ( log4jConfig != null ) {
                final Log4JConfigurator configurator = new Log4JConfigurator(subcontext);

                // test if this is a qualified url
                InputStream is = null;
                if ( log4jConfig.indexOf(':') == -1) {
                    is = this.servletContext.getResourceAsStream(log4jConfig);
                    if (is == null) is = new FileInputStream(log4jConfig);
                } else {
                    final URL log4jURL = new URL(log4jConfig);
                    is = log4jURL.openStream();
                }
                configurator.doConfigure(is, LogManager.getLoggerRepository());
            }

            ContainerUtil.initialize(loggerManager);
        } catch (Exception e) {
            errorHandler.error("Could not set up Cocoon Logger, will use screen instead", e, null);
View Full Code Here

            }

            // let's configure log4j
            final String log4jConfig = getInitParameter("log4j-config", null);
            if ( log4jConfig != null ) {
                final Log4JConfigurator configurator = new Log4JConfigurator(subcontext);

                // test if this is a qualified url
                InputStream is = null;
                if ( log4jConfig.indexOf(':') == -1) {
                    is = this.portletContext.getResourceAsStream(log4jConfig);
                    if (is == null) is = new FileInputStream(log4jConfig);
                } else {
                    final URL log4jURL = new URL(log4jConfig);
                    is = log4jURL.openStream();
                }
                configurator.doConfigure(is, LogManager.getLoggerRepository());
            }

            ContainerUtil.initialize(loggerManager);
        } catch (Exception e) {
            errorHandler.error("Could not set up Cocoon Logger, will use screen instead", e, null);
View Full Code Here

            }

            // let's configure log4j
            final String log4jConfig = getInitParameter("log4j-config", null);
            if ( log4jConfig != null ) {
                final Log4JConfigurator configurator = new Log4JConfigurator(subcontext);

                // test if this is a qualified url
                InputStream is = null;
                if ( log4jConfig.indexOf(':') == -1) {
                    is = this.portletContext.getResourceAsStream(log4jConfig);
                    if (is == null) is = new FileInputStream(log4jConfig);
                } else {
                    final URL log4jURL = new URL(log4jConfig);
                    is = log4jURL.openStream();
                }
                configurator.doConfigure(is, LogManager.getLoggerRepository());
            }

            ContainerUtil.initialize(loggerManager);
        } catch (Exception e) {
            errorHandler.error("Could not set up Cocoon Logger, will use screen instead", e, null);
View Full Code Here

            }

            // let's configure log4j
            final String log4jConfig = getInitParameter("log4j-config", null);
            if ( log4jConfig != null ) {
                final Log4JConfigurator configurator = new Log4JConfigurator(subcontext);

                // test if this is a qualified url
                InputStream is = null;
                if ( log4jConfig.indexOf(':') == -1) {
                    is = this.servletContext.getResourceAsStream(log4jConfig);
                    if (is == null) is = new FileInputStream(log4jConfig);
                } else {
                    final URL log4jURL = new URL(log4jConfig);
                    is = log4jURL.openStream();
                }
                configurator.doConfigure(is, LogManager.getLoggerRepository());
            }

            ContainerUtil.initialize(loggerManager);
        } catch (Exception e) {
            errorHandler.error("Could not set up Cocoon Logger, will use screen instead", e, null);
View Full Code Here

            }

            // let's configure log4j
            final String log4jConfig = getInitParameter("log4j-config", null);
            if ( log4jConfig != null ) {
                final Log4JConfigurator configurator = new Log4JConfigurator(subcontext);

                // test if this is a qualified url
                InputStream is = null;
                if ( log4jConfig.indexOf(':') == -1) {
                    is = this.portletContext.getResourceAsStream(log4jConfig);
                    if (is == null) is = new FileInputStream(log4jConfig);
                } else {
                    final URL log4jURL = new URL(log4jConfig);
                    is = log4jURL.openStream();
                }
                configurator.doConfigure(is, LogManager.getLoggerRepository());
            }

            ContainerUtil.initialize(loggerManager);
        } catch (Exception e) {
            errorHandler.error("Could not set up Cocoon Logger, will use screen instead", e, null);
View Full Code Here

            }

            // let's configure log4j
            final String log4jConfig = getInitParameter("log4j-config", null);
            if ( log4jConfig != null ) {
                final Log4JConfigurator configurator = new Log4JConfigurator(subcontext);

                // test if this is a qualified url
                InputStream is = null;
                if ( log4jConfig.indexOf(':') == -1) {
                    is = this.servletContext.getResourceAsStream(log4jConfig);
                    if (is == null) is = new FileInputStream(log4jConfig);
                } else {
                    final URL log4jURL = new URL(log4jConfig);
                    is = log4jURL.openStream();
                }
                configurator.doConfigure(is, LogManager.getLoggerRepository());
            }

            ContainerUtil.initialize(loggerManager);
        } catch (Exception e) {
            errorHandler.error("Could not set up Cocoon Logger, will use screen instead", e, null);
View Full Code Here

TOP

Related Classes of org.apache.cocoon.util.log.Log4JConfigurator

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.