Package org.apache.log4j

Examples of org.apache.log4j.Level


           
        if (rs != null)
        {
          while(rs.next())
          {
            Level l = new DynamicLevel (rs.getInt("LJLEVEL"),rs.getString("LCODE"),rs.getInt("LSYSLOGEQUIV"));
                Integer levelint = new Integer(rs.getInt("LSYSLOGEQUIV"));
             
                htLevels.put(levelint, l);
          }
        }
View Full Code Here


        datalog =(TLogQueue)(adtmsg.getAdtPayload());
         
          Category logger = Logger.getLogger(datalog.getLuser()+ "." +datalog.getLsection());
         
          // convert the PL/SQL log level in LOG4J level
          Level level = (DynamicLevel)htLevels.get(new Integer (datalog.getLlevel().intValue()));
 
          if (level != null) {
             priority = level;
          } else {
            priority = Level.toLevel("UNDEFINED",  Level.ERROR );
View Full Code Here

  @Override
  public boolean isEnabled(String context, int level) {
      if ( context == null ) {
            return false;
        }
      Level logLevel = convert2Log4JLevel(level);
        if ( logLevel == Level.OFF) {
            return false;
        }
        Logger log = getLogger(context);
        return log.isEnabledFor(logLevel);
View Full Code Here

     *
     * @param level
     * @return prior level
     */
    public static Level setLogging(Level level) {
        Level prior = s_logger.getLevel();
        s_logger.setLevel(level);
        return prior;
    }
View Full Code Here

    }

    public void testLog4JLoggerTraceEnabled()
        throws Exception
    {
        final Level level = Level.DEBUG;
        final Level type = Level.DEBUG;
        final String message = "Meep!";
        final Throwable throwable = null;
        final boolean output = true;

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

    }

    public void testLog4JLoggerTraceDisabled()
        throws Exception
    {
        final Level level = Level.ERROR;
        final String message = "Meep!";

        final MockAppender target = new MockAppender();
        final Log4JLogger logger = createLogger( target, level );
        logger.trace( message );
View Full Code Here

    }

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

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

    }

    public void testLog4JLoggerTraceWithExceptionDisabled()
        throws Exception
    {
        final Level level = Level.ERROR;
        final String message = "Meep!";
        final Throwable throwable = new Throwable();

        final MockAppender target = new MockAppender();
        final Log4JLogger logger = createLogger( target, level );
View Full Code Here

    }

    public void testLog4JLoggerDebugEnabled()
        throws Exception
    {
        final Level level = Level.DEBUG;
        final Level type = Level.DEBUG;
        final String message = "Meep!";
        final Throwable throwable = null;
        final boolean output = true;

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

    }

    public void testLog4JLoggerDebugDisabled()
        throws Exception
    {
        final Level level = Level.ERROR;
        final String message = "Meep!";

        final MockAppender target = new MockAppender();
        final Log4JLogger logger = createLogger( target, level );
        logger.debug( message );
View Full Code Here

TOP

Related Classes of org.apache.log4j.Level

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.