Package org.apache.log

Examples of org.apache.log.Priority


     */
    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


            logLevel = "INFO";
        }

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

        final Priority logPriority = Priority.getPriorityForName(logLevel.trim());

        final ServletOutputLogTarget servTarget = new ServletOutputLogTarget(this.servletContext);

        final CocoonLogFormatter formatter = new CocoonLogFormatter();
        formatter.setFormat( "%7.7{priority} %{time}   [%8.8{category}] " +
View Full Code Here

    /**
     * Set log level. Default is DEBUG.
     * @param logLevel log level
     */
    public void setLogLevel(String logLevel) {
        final Priority priority = Priority.getPriorityForName(logLevel);
        Hierarchy.getDefaultHierarchy().setDefaultPriority(priority);
        CocoonBean.log = Hierarchy.getDefaultHierarchy().getLoggerFor("");
    }
View Full Code Here

                    followLinks = "yes".equals(option.getArgument())
                        || "true".equals(option.getArgument());
            }
        }

        final Priority priority = Priority.getPriorityForName(logLevel);
        Hierarchy.getDefaultHierarchy().setDefaultPriority(priority);
        log = Hierarchy.getDefaultHierarchy().getLoggerFor("");

        if (destDir.equals("")) {
            String error = "Careful, you must specify a destination dir when using the -d/--destDir argument";
View Full Code Here

                    brokenLinkFile = new File(option.getArgument());
                    break;
            }
        }

        final Priority priority = Priority.getPriorityForName(logLevel);
        Hierarchy.getDefaultHierarchy().setDefaultPriority(priority);
        log = Hierarchy.getDefaultHierarchy().getLoggerFor("");

        if (destDir.equals("")) {
            String error = "Careful, you must specify a destination dir when using the -d/--destDir argument";
View Full Code Here

            logLevel = "INFO";
        }

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

        final Priority logPriority = Priority.getPriorityForName(logLevel.trim());

        final ServletOutputLogTarget servTarget = new ServletOutputLogTarget(this.servletContext);

        final CocoonLogFormatter formatter = new CocoonLogFormatter();
        formatter.setFormat( "%7.7{priority} %{time}   [%8.8{category}] " +
View Full Code Here

    if (values.length > 2){ // Throwable wanted
      t = new Throwable(((CompoundVariable) values[2]).execute());
    }
   
    // N.B. if the string is not recognised, DEBUG is assumed
        Priority p = Priority.getPriorityForName(priorityString);

        log.log(p,stringToLog,t);
       
        return "";
View Full Code Here

    if (values.length > 2){ // Throwable wanted
      t = new Throwable(((CompoundVariable) values[2]).execute());
    }
   
    // N.B. if the string is not recognised, DEBUG is assumed
        Priority p = Priority.getPriorityForName(priorityString);

        log.log(p,stringToLog,t);
       
        return stringToLog;
View Full Code Here

        String logLevel = getInitParameter("log-level");
        if (logLevel == null) {
            logLevel = "INFO";
        }

        final Priority logPriority = Priority.getPriorityForName(logLevel.trim());

        final ServletOutputLogTarget servTarget = new ServletOutputLogTarget(this.servletContext);

        final CocoonLogFormatter formatter = new CocoonLogFormatter();
        formatter.setFormat( "%7.7{priority} %{time}   [%8.8{category}] " +
View Full Code Here

      printDetails(System.err,s,t);
    }
    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();
                log.log(p,tn+" "+s,t);
      }
    }
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.