Package org.apache.log4j

Examples of org.apache.log4j.Level


            System.out.println(dumpConfiguration(jadConfig.dump()));
            System.exit(0);
        }

        // Are we in debug mode?
        Level logLevel = Level.INFO;
        if (commandLineArguments.isDebug()) {
            LOG.info("Running in Debug mode");
            logLevel = Level.DEBUG;
        }
View Full Code Here


                info.put("title", subsystem.getValue().getTitle());
                info.put("category", subsystem.getValue().getCategory());
                info.put("description", subsystem.getValue().getDescription());

                // Get level.
                Level effectiveLevel = Logger.getLogger(subsystem.getValue().getCategory()).getEffectiveLevel();
                info.put("level", effectiveLevel.toString().toLowerCase());
                info.put("level_syslog", effectiveLevel.getSyslogEquivalent());

                subsystems.put(subsystem.getKey(), info);
            } catch (Exception e) {
                LOG.error("Error while listing logger subsystem.", e);
                continue;
View Full Code Here

        // This is never null. Worst case is a logger that does not exist.
        Logger logger = Logger.getLogger(subsystem.getCategory());

        // Setting the level falls back to DEBUG if provided level is invalid.
        Level newLevel = Level.toLevel(level.toUpperCase());
        logger.setLevel(newLevel);

        return Response.ok().build();
    }
View Full Code Here

        checkPermission(RestPermissions.LOGGERS_EDIT, loggerName);
        // This is never null. Worst case is a logger that does not exist.
        Logger logger = Logger.getLogger(loggerName);

        // Setting the level falls back to DEBUG if provided level is invalid.
        Level newLevel = Level.toLevel(level.toUpperCase());
        logger.setLevel(newLevel);

        return Response.ok().build();
    }
View Full Code Here

            installer.install();
            System.exit(0);
        }

        // Are we in debug mode?
        Level logLevel = Level.INFO;
        if (commandLineArguments.isDebug()) {
            LOG.info("Running in Debug mode");
            logLevel = Level.DEBUG;
        }
        org.apache.log4j.Logger.getRootLogger().setLevel(logLevel);
View Full Code Here

    protected void setLogging(OptionSet options) {
        // "Options are \"debug\", \"info\" (default), \"warn\", \"error\", or \"off\"")
        String levelString = CmdUtils.valueOf(options, "logging", "info");

        Level level = null;

        if(levelString.equals("debug"))
            level = Level.DEBUG;
        else if(levelString.equals("info"))
            level = Level.INFO;
View Full Code Here

    if(args.length > 2)
      conf.set(USER_NAME_KEY, args[2]);
    boolean useDelegationToken = false;
    if(args.length > 3)
      useDelegationToken = args[3].equalsIgnoreCase("useToken");
    Level l = Level.ERROR;
    if(args.length > 4)
      l = Level.toLevel(args[4]);

    MiniRPCBenchmark mb = new MiniRPCBenchmark(l);
    long elapsedTime = 0;
View Full Code Here

            return null;
        }

        String message = LogMessageManager.getInstance().createLogMessage(messageId,
                Log.changeNullToStr(messageArgs, LOG_MESSAGE_ARG_NULL_STR));
        Level level = LogMessageManager.getInstance().getLogLevel(messageId);
        Timestamp logTime = new Timestamp(System.currentTimeMillis());

        Log.setMDC(messageId, logTime);
        Log.writeLog(t, clazz, level, message);
        Log.resetMDC();
View Full Code Here

     * </p>
     * @param messageId メッセージID
     * @return ログレベル
     */
    public Level getLogLevel(String messageId) {
        Level level = levelMap.get(messageId);
        if (level == null) {
            return Level.ERROR;
        }

        return level;
View Full Code Here

              }
            }
          }
        }
      }
      Level levelImpl = HsloggerLevel.toLevel(level);
     
      if (exception == null) {
          exception = new String[]{""};
      }
     
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.