Examples of Priority


Examples of org.apache.log.Priority

    }

    public void testLogkitLoggerErrorWithExceptionEnabled()
        throws Exception
    {
        final Priority level = Priority.DEBUG;
        final Priority type = Priority.ERROR;
        final String message = "Meep!";
        final Throwable throwable = new Throwable();
        final boolean output = true;

        final MockLogTarget target = new MockLogTarget();
View Full Code Here

Examples of org.apache.log.Priority

        } 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();
                StringBuilder sb = new StringBuilder(40);
                sb.append(tn);
                if (c.length()>0){
View Full Code Here

Examples of org.apache.log.Priority

            {
                final String message = REZ.getString( "unknown-target", target, name );
                throw new ConfigurationException( message );
            }

            final Priority priority = Priority.getPriorityForName( priorityName );
            if( !priority.getName().equals( priorityName ) )
            {
                final String message = REZ.getString( "unknown-priority", priorityName, name );
                throw new ConfigurationException( message );
            }
View Full Code Here

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

Examples of org.apache.log.Priority

            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

Examples of org.apache.log.Priority

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

Examples of org.apache.log.Priority

                    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

Examples of org.apache.log4j.Priority

  public void Create()
  {
    AdtMessage adtmsg;
    TLogQueue datalog;
   
      Priority priority = null;
      LoggingEvent  event;
      String        fqnOfCategoryClass = "fqnOfCategoryClass";
      Throwable     myThrowable = null;
   
    try{
View Full Code Here

Examples of org.apache.log4j.Priority

    /**
     * Tests LoggingEvent.fqnOfCategoryClass.
     */
  public void testFQNOfCategoryClass() {
      Category root = Logger.getRootLogger();
      Priority info = Level.INFO;
      String catName = Logger.class.toString();
      LoggingEvent event =
        new LoggingEvent(
          catName, root, info, "Hello, world.", null);
      assertEquals(catName, event.fqnOfCategoryClass);
View Full Code Here

Examples of org.apache.log4j.Priority

     * Tests LoggingEvent.level.
     * @deprecated
     */
  public void testLevel() {
      Category root = Logger.getRootLogger();
      Priority info = Level.INFO;
      String catName = Logger.class.toString();
      LoggingEvent event =
        new LoggingEvent(
          catName, root, 0L,  info, "Hello, world.", null);
      Priority error = Level.ERROR;
      event.level = error;
      assertEquals(Level.ERROR, event.level);
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.