Package org.apache.log

Examples of org.apache.log.Priority


        {
            // let them know we're not OK
            m_reliableLogger.fatalError( message, throwable );

            // transmit the original error
            final Priority p = event.getPriority();
            final String nestedMessage = "nested log event: " + event.getMessage();

            if ( p == Priority.DEBUG )
            {
                m_reliableLogger.debug( nestedMessage, event.getThrowable() );
View Full Code Here


    {
        // let them know we're not OK
        m_reliableLogger.fatalError( message, throwable );

        // transmit the original error
        final Priority p = event.getPriority();
        final String nestedMessage = "nested log event: " + event.getMessage();

        if ( p == Priority.DEBUG )
        {
            m_reliableLogger.debug( nestedMessage, event.getThrowable() );
View Full Code Here

     */
    public void processEvent( LogEvent event )
    {
        final String message = event.getMessage();
        final Throwable throwable = event.getThrowable();
        final Priority priority = event.getPriority();
        if( Priority.DEBUG == priority )
        {
            m_logger.debug( message, throwable );
        }
        else if( Priority.INFO == priority )
View Full Code Here

    protected void initLogger() {
        final String logLevel = getInitParameter("log-level", "INFO");

        final String accesslogger = getInitParameter("servlet-logger", "cocoon");

        final Priority logPriority = Priority.getPriorityForName(logLevel);

        final CocoonLogFormatter formatter = new CocoonLogFormatter();
        formatter.setFormat("%7.7{priority} %{time}   [%8.8{category}] " +
                            "(%{uri}) %{thread}/%{class:short}: %{message}\\n%{throwable}");
        final ServletOutputLogTarget servTarget = new ServletOutputLogTarget(this.servletContext, formatter);
View Full Code Here

    protected void initLogger() {
        final String logLevel = getInitParameter("log-level", "INFO");

        final String accesslogger = getInitParameter("portlet-logger", "cocoon");

        final Priority logPriority = Priority.getPriorityForName(logLevel);

        final CocoonLogFormatter formatter = new CocoonLogFormatter();
        formatter.setFormat("%7.7{priority} %{time}   [%8.8{category}] " +
                            "(%{uri}) %{thread}/%{class:short}: %{message}\\n%{throwable}");
        final PortletOutputLogTarget servTarget = new PortletOutputLogTarget(this.portletContext, formatter);
View Full Code Here

    } else if (prio.equalsIgnoreCase("ERR")) //$NON-NLS-1
    {
      printDetails(System.err, s, t, c);
    } else {
      // N.B. if the string is not recognised, DEBUG is assumed
      Priority p = Priority.getPriorityForName(prio);
      if (log.isPriorityEnabled(p)) {// Thread method is potentially expensive
        String tn = Thread.currentThread().getName();
        StringBuffer sb = new StringBuffer(40);
        sb.append(tn);
        if (c.length()>0){
View Full Code Here

            appLogger = Hierarchy.getDefaultHierarchy().getLoggerFor(
                    IConst.LOG.APPLICATION_LOG_NAME);
            String logLevel = prop.getProperty("logs.level");
            if (null == logLevel) logLevel = "DEBUG";

            Priority priority = Priority.getPriorityForName(logLevel);
            appLogger.setPriority(priority);

            final PatternFormatter appformatter = new PatternFormatter(prop
                    .getProperty("logs.pattern.application"));
View Full Code Here

    protected void initLogger() {
        final String logLevel = getInitParameter("log-level", "INFO");

        final String accesslogger = getInitParameter("servlet-logger", "cocoon");

        final Priority logPriority = Priority.getPriorityForName(logLevel);

        final CocoonLogFormatter formatter = new CocoonLogFormatter();
        formatter.setFormat( "%7.7{priority} %{time}   [%8.8{category}] " +
                             "(%{uri}) %{thread}/%{class:short}: %{message}\\n%{throwable}" );
        final ServletOutputLogTarget servTarget = new ServletOutputLogTarget(this.servletContext, formatter );
View Full Code Here

    protected void initLogger() {
        String logLevel = getInitParameter("log-level", "INFO");

        final String accesslogger = getInitParameter("servlet-logger");

        final Priority logPriority = Priority.getPriorityForName(logLevel);

        final CocoonLogFormatter formatter = new CocoonLogFormatter();
        formatter.setFormat("%7.7{priority} %{time}   [%8.8{category}] " +
                            "(%{uri}) %{thread}/%{class:short}: %{message}\\n%{throwable}");
        final PortletOutputLogTarget servTarget = new PortletOutputLogTarget(this.portletContext, formatter);
View Full Code Here

                logLevel = "WARN";
            }

            // configure the logKitLoggerManager,
            // either by using a logkit.xconf file or by a logger
            final Priority priority = Priority.getPriorityForName(logLevel);
            Hierarchy.getDefaultHierarchy().setDefaultPriority(priority);
            this.logger = new LogKitLogger(Hierarchy.getDefaultHierarchy().getLoggerFor(""));

            child = configuration.getChild("logKit", false);
            if (child != null) {
View Full Code Here

TOP

Related Classes of org.apache.log.Priority

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.