Package proto.logging.api

Examples of proto.logging.api.Log


     * @param controller
     * @param type
     * @throws UnknownHostException
     */
    public static void threadStatus(Controller controller, ThreadStatusType type, String object) {
        Log log = new Log(LOG_NAME, Log.Type.STATUS);
        String actionType = getThreadStatusString(type);
        log.setAction(actionType);
        log.setRole("AgentJ Threads");

        LogProperties props = new LogProperties("Thread Status");

        if (controller.getLocalHost()!=null)
            props.put("NS2 Node", controller.getLocalHost());

        props.put("Thread Count", String.valueOf(controller.getThreadMonitor().getThreadCount()));

        if (object!=null)
            props.put("Target Object", object);
       
        log.addLogProperties(props);
        log.logStart();
    }
View Full Code Here


      * @param controller
      * @param type
      * @throws UnknownHostException
      */
     public static void monitorStatus(Controller controller, MonitorStatusType type, String object) {
         Log log = new Log(LOG_NAME, Log.Type.STATUS);
         String actionType = getMonitorStatusString(type);
         log.setAction(actionType);
         log.setRole("AgentJ Monitor");

         LogProperties props = new LogProperties("Monitor Status");
         props.put("NS2 Node", controller.getLocalHost());
         props.put("Thread Count", String.valueOf(controller.getThreadMonitor().getThreadCount()));
         if (object!=null)
             props.put("Target Object", object);

         log.addLogProperties(props);
         log.logStart();
     }
View Full Code Here

      * @param controller
      * @param type
      * @throws UnknownHostException
      */
     public static void conditionStatus(Controller controller, ConditionStatusType type, String object) {
         Log log = new Log(LOG_NAME, Log.Type.STATUS);
         String actionType = getConditionStatusString(type);
         log.setAction(actionType);
         log.setRole("AgentJ Condition");

         LogProperties props = new LogProperties("Condition Status");
         props.put("Ns2 Node", controller.getLocalHost());
         props.put("Thread Count", String.valueOf(controller.getThreadMonitor().getThreadCount()));
         if (object!=null)
             props.put("Target Object", object);

         log.addLogProperties(props);
         log.logStart();
     }
View Full Code Here

         log.addLogProperties(props);
         log.logStart();
     }

    public static void parkStatus(Controller controller, ParkStatusType  type, String object) {
        Log log = new Log(LOG_NAME, Log.Type.STATUS);
        String actionType = getParkStatusString(type);
        log.setAction(actionType);
        log.setRole("AgentJ Park");

        LogProperties props = new LogProperties("Park Status");
        props.put("Ns2 Node", controller.getLocalHost());
        props.put("Thread Count", String.valueOf(controller.getThreadMonitor().getThreadCount()));
        if (object!=null)
            props.put("Target Object", object);

        log.addLogProperties(props);
        log.logStart();
    }
View Full Code Here

        log.addLogProperties(props);
        log.logStart();
    }

    public static void workStatus(ReleaseSafeSync sync, Controller controller, WorkStatusType  type, String object) {
        Log log = new Log(LOG_NAME, Log.Type.STATUS);
        String actionType = getWorkStatusString(type);
        log.setAction(actionType);
        log.setRole("AgentJ Worker Status");

        LogProperties props = new LogProperties("Work Status");
        props.put("Ns2 Node", controller.getLocalHost());
        props.put("Thread Count", String.valueOf(controller.getThreadMonitor().getThreadCount()));
        props.put("Worker Queue is ", String.valueOf(sync.getWorkersWaiting()) );
        if (object!=null)
            props.put("Target Object", object);

        log.addLogProperties(props);
        log.logStart();
    }
View Full Code Here

TOP

Related Classes of proto.logging.api.Log

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.