Package ch.qos.logback.core.status

Examples of ch.qos.logback.core.status.StatusUtil.addError()


    StatusUtil statusUtil = new StatusUtil(context);
    try {
      return new ObjectName(objectNameAsStr);
    } catch (MalformedObjectNameException e) {
      statusUtil.addError(caller, msg, e);
      return null;
    } catch (NullPointerException e) {
      statusUtil.addError(caller, msg, e);
      return null;
    }
View Full Code Here


      return new ObjectName(objectNameAsStr);
    } catch (MalformedObjectNameException e) {
      statusUtil.addError(caller, msg, e);
      return null;
    } catch (NullPointerException e) {
      statusUtil.addError(caller, msg, e);
      return null;
    }
  }

  public static boolean isRegistered(MBeanServer mbs, ObjectName objectName) {
View Full Code Here

      JMXConfigurator jmxConfigurator, ObjectName objectName, Object caller) {
    try {
      mbs.registerMBean(jmxConfigurator, objectName);
    } catch (Exception e) {
      StatusUtil statusUtil = new StatusUtil(loggerContext);
      statusUtil.addError(caller, "Failed to create mbean", e);
    }
  }

  public static void unregister(LoggerContext loggerContext, MBeanServer mbs,
      ObjectName objectName, Object caller) {
View Full Code Here

        statusUtil.addInfo(caller, "Unregistering mbean ["
            + objectName + "]");
        mbs.unregisterMBean(objectName);
      } catch (InstanceNotFoundException e) {
        // this is theoretically impossible
        statusUtil.addError(caller, "Failed to unregister mbean"
            + objectName, e);
      } catch (MBeanRegistrationException e) {
        // this is theoretically impossible
        statusUtil.addError(caller, "Failed to unregister mbean"
            + objectName, e);
View Full Code Here

        // this is theoretically impossible
        statusUtil.addError(caller, "Failed to unregister mbean"
            + objectName, e);
      } catch (MBeanRegistrationException e) {
        // this is theoretically impossible
        statusUtil.addError(caller, "Failed to unregister mbean"
            + objectName, e);
      }
    } else {
      statusUtil.addInfo(caller, "mbean [" + objectName
          + "] does not seem to be registered");
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.