Package com.alu.e3.data.model

Examples of com.alu.e3.data.model.LogLevel


  @Description(value = "REST API to set the java log level for an instance (1 for localhost, 0 for global).")
    public Response restSetInstanceLogLevel(@PathParam("instanceId") String instanceId, String level)
    {
      logger.debug("rest-api call to setInstanceLogLevel with instanceId = {}, level = {}",
          instanceId != null ? instanceId : "(null)", level != null ? level : "(null)");
      LogLevel logLevel = null;
      try {
        if (LogLevel.isValidLogLevel(level)) {
          logLevel = new LogLevel(level);
          if (isGlobalInstanceId(instanceId)) {
            setGlobalLogLevel(logLevel);
          } else {
            setLocalLogLevel(logLevel);
          }
View Full Code Here


  @Produces({ MediaType.APPLICATION_XML })
  @Consumes({ MediaType.WILDCARD })
  @Description(value = "REST API to retrieve the global servicemix log level.")
    public Response restGetSMXLogLevel()
    {
      LogLevel logLevel = null;
      if(logger.isDebugEnabled()) {
        logger.debug("rest-api call to getSMXLogLevel");
      }
      try {
      // The parameterless (no instanceId) version could get either the
View Full Code Here

  @Produces({ MediaType.APPLICATION_XML })
  @Consumes({ MediaType.WILDCARD })
  @Description(value = "REST API to retrieve the servicemix log level for an instance (1 for localhost, 0 for global).")
    public Response restGetInstanceSMXLogLevel(@PathParam("instanceId") String instanceId)
    {
      LogLevel logLevel = null;
      if(logger.isDebugEnabled()) {
        logger.debug("rest-api call to getInstanceSMXLogLevel with instanceId: {}", (instanceId == null ? "(null)" : instanceId));
      }
      try {
        logLevel = isGlobalInstanceId(instanceId) ? getGlobalSMXLogLevel() : getLocalSMXLogLevel();   
View Full Code Here

    public Response restSetSMXLogLevel(String level)
    {
      if(logger.isDebugEnabled()) {
        logger.debug("rest-api call to setSMXLogLevel with level = {}", level != null ? level : "(null)");
      }
      LogLevel logLevel = null;
      try {
        if (LogLevel.isValidLogLevel(level)) {
          logLevel = new LogLevel(level);
          // The parameterless (no instanceId) version could set either the
          // local or the global log level.
          // For now, it sets the global level.
          setGlobalSMXLogLevel(logLevel);
        } else {
View Full Code Here

  @Description(value = "REST API to set the servicemix log level for an instance (1 for localhost, 0 for global).")
    public Response restSetInstanceSMXLogLevel(@PathParam("instanceId") String instanceId, String level)
    {
      logger.debug("rest-api call to setInstanceSMXLogLevel with instanceId = {}, level = {}",
          instanceId != null ? instanceId : "(null)", level != null ? level : "(null)");
      LogLevel logLevel = null;
      try {
        if (LogLevel.isValidLogLevel(level)) {
          logLevel = new LogLevel(level);
          if (isGlobalInstanceId(instanceId)) {
            setGlobalSMXLogLevel(logLevel);
          } else {
            setLocalSMXLogLevel(logLevel);
          }
View Full Code Here

   * if a global log-level is found in the DataManager cache,
   * or <code>null</code> if not.
   */
  public LogLevel getGlobalLogLevel()
  {
    LogLevel logLevel = null;
    // Get the system-wide log level value (in the cache)
    if ((this.dataManager == null) || !dataManagerReady) {
      logger.error("call to shared getLogLevel but DataManager is null or not ready!");
    } else {
      logLevel = dataManager.getLogLevel();
      logger.debug("retrieved cached log-level value: {}", (logLevel == null ? "(null)" : logLevel.toString()));
    }
    return logLevel;
  }
View Full Code Here

   * if a global log-level is found in the DataManager cache,
   * or <code>null</code> if not.
   */
  public LogLevel getGlobalSMXLogLevel()
  {
    LogLevel logLevel = null;
    // Get the system-wide log level value (in the cache)
    if ((this.dataManager == null) || !dataManagerReady) {
      logger.error("call to shared getSMXLogLevel but DataManager is null or not ready!");
    } else {
      logLevel = dataManager.getSMXLogLevel();
      logger.debug("retrieved cached smxlog-level value: {}", (logLevel == null ? "(null)" : logLevel.toString()));
    }
    return logLevel;
  }
View Full Code Here

    String syslogLevel = null;
    // Get the system-wide syslog level value (in the cache)
    if ((this.dataManager == null) || !dataManagerReady) {
      logger.error("call to shared getLogLevel but DataManager is null or not ready!");
    } else {
      LogLevel logLevel = dataManager.getSyslogLevel();
      logger.debug("retrieved cached log-level value: {}", (logLevel == null ? "(null)" : logLevel.toString()));
      if (logLevel != null) {
        syslogLevel = logLevel.getSyslogLevel().name();
      }
    }
    return syslogLevel;
  }
View Full Code Here

       // Set the system-wide syslog level (in the cache)
    // LoggingClient will set our local syslog level when it picks up the cache change
    if ((this.dataManager == null) || !dataManagerReady) {
      logger.error("call to shared setSyslogLevel but DataManager is null or not ready!");
    } else {
      LogLevel equivLevel = new LogLevel(syslogLevel);
      dataManager.setSyslogLevel(equivLevel);     
      logger.debug("setting cached syslog-level value to: {} (requested {})", equivLevel.toString(), syslogLevel);
    }
  }
View Full Code Here

   * @return          LogLevel representing current log4j level, or null if not found
   * @throws IOException
   */
  public static LogLevel getLocalLogLevel(LogFileSource logSource) throws IOException
  {
    LogLevel level = null;
    synchronized(getConfigFileLock()) {
      level = LoggingUtil.getLogLevelFromConfigFile(new FileInputStream(defaultConfigPath), logSource);
    }
    return level;
  }
View Full Code Here

TOP

Related Classes of com.alu.e3.data.model.LogLevel

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.