Package org.apache.log4j

Examples of org.apache.log4j.Priority


    category.debug(message, throwable);
  }

  public final boolean isDebugEnabled()
  {
    Priority p = Priority.DEBUG;
    if (category.isEnabledFor(p) == false)
      return false;
    return p.isGreaterOrEqual(category.getChainedPriority());
  }
View Full Code Here


    category.log(TracePriority.TRACE, message, throwable);
  }

  public final boolean isTraceEnabled()
  {
    Priority p = TracePriority.TRACE;
    if (category.isEnabledFor(p) == false)
      return false;
    return p.isGreaterOrEqual(category.getChainedPriority());
  }
View Full Code Here

            }
        } else {
            admin = Admin.ADMINTYPETEXTS[admininfo.getAdminType()];
        }

        Priority priority = Level.INFO;
        String eventText = "";
        if (event >= LogConstants.EVENT_SYSTEM_BOUNDRARY) {
            event -= LogConstants.EVENT_SYSTEM_BOUNDRARY;
            eventText = LogConstants.EVENTNAMES_SYSTEM[event];
        } else if (event >= LogConstants.EVENT_ERROR_BOUNDRARY) {
View Full Code Here

        public Priority getThreshold() {
            return TO_LOG4J.get(handler.getLevel());
        }
        @Override
        public boolean isAsSevereAsThreshold(Priority priority) {
            Priority p = getThreshold();
            return (p == null) || priority.isGreaterOrEqual(p);
        }       
View Full Code Here

            if (layout instanceof PatternLayout) {
                appenderData.setPattern(((PatternLayout) layout).getConversionPattern());
            }
            if (targetAppender instanceof AppenderSkeleton) {          // normally all the appenders inherit from AppenderSkelton
                AppenderSkeleton appender = (AppenderSkeleton) targetAppender;
                Priority priority = appender.getThreshold();
                if (priority != null) {
                    appenderData.setThreshold(priority.toString());
                } else {
                    appender.setThreshold(Level.toLevel(Priority.DEBUG_INT));
                    appenderData.setThreshold("DEBUG");
                }
            }
View Full Code Here

     * @return the level that should be used for the event
     * @aribaapi private
     */
    public synchronized Priority possiblySuppress (Priority eventLevel)
    {
        Priority levelToUse = eventLevel;

        long now = System.currentTimeMillis();
        if (now > _firstTime + _suppressTime) {
            // we've exceeded our time bucket.  Use the event as is and restart clock.
            _firstTime = now;
View Full Code Here

     * Logger level setter.
     *
     * @param loggerLevel New logger level
     */
    public void setLoggerLevel(String channel, int loggerLevel) {
        Priority priority = toPriority(loggerLevel);
        Category cat = getCategory(channel);
        cat.setPriority(priority);
    }
View Full Code Here

   
    /**
     * Convert Slide priority to log4j priority.
     */
    protected Priority toPriority(int priority) {
        Priority result = null;
       
        switch (priority) {
        case EMERGENCY:
            result = Priority.FATAL;
            break;
View Full Code Here

            return TO_LOG4J.get(handler.getLevel());
        }

        @Override
        public boolean isAsSevereAsThreshold(final Priority priority) {
            final Priority p = getThreshold();
            return p == null || priority.isGreaterOrEqual(p);
        }
View Full Code Here

        c.anchor = GridBagConstraints.WEST;

        c.gridy = 0;
        final Priority[] allPriorities = Priority.getAllPossiblePriorities();
        final JComboBox priorities = new JComboBox(allPriorities);
        final Priority lowest = allPriorities[allPriorities.length - 1];
        priorities.setSelectedItem(lowest);
        aModel.setPriorityFilter(lowest);
        gridbag.setConstraints(priorities, c);
        add(priorities);
        priorities.setEditable(false);
View Full Code Here

TOP

Related Classes of org.apache.log4j.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.