Package org.osgi.service.log

Examples of org.osgi.service.log.LogService.log()


    void log(int level, String msg) {
        ServiceReference srLog = bc.getServiceReference(logServiceName);
        if (srLog != null) {
            LogService sLog = (LogService) bc.getService(srLog);
            if (sLog != null) {
                sLog.log(level, msg);
            }
            bc.ungetService(srLog);
        }
    }
}
View Full Code Here


        ServiceReference srLog = bc
                .getServiceReference("org.osgi.service.log.LogService");
        if (srLog != null) {
            LogService sLog = (LogService) bc.getService(srLog);
            if (sLog != null) {
                sLog.log(level, msg, t);
            }
            bc.ungetService(srLog);
        }
    }
View Full Code Here

  static void logBC(BundleContext bc, int level, String msg, Throwable t) {
    ServiceReference sr = bc.getServiceReference(LogService.class.getName());
    if (sr != null) {
      LogService log = (LogService)bc.getService(sr);
      if (log != null) {
        log.log(level, msg, t);
        bc.ungetService(sr);
      }
    }
  }
View Full Code Here

      return;
    LogService log = (LogService) logTracker.getService();
    if (log == null)
      return;
    if (t == null) {
      log.log(level, message);
    } else {
      log.log(level, message, t);
    }
  }
View Full Code Here

    if (log == null)
      return;
    if (t == null) {
      log.log(level, message);
    } else {
      log.log(level, message, t);
    }
  }

}
View Full Code Here

    ServiceReference srLog = bc.getServiceReference(logServiceName);
    if (srLog != null) {
      LogService sLog = (LogService)bc.getService(srLog);
      if (sLog != null) {
        if(e != null) {
          sLog.log(level, msg, e);
        } else {
          sLog.log(level, msg);
        }
      }
      bc.ungetService(srLog);
View Full Code Here

      LogService sLog = (LogService)bc.getService(srLog);
      if (sLog != null) {
        if(e != null) {
          sLog.log(level, msg, e);
        } else {
          sLog.log(level, msg);
        }
      }
      bc.ungetService(srLog);
    }
  }
View Full Code Here

    ServiceReference sRef =
      bc.getServiceReference(LogService.class.getName());
    if (sRef != null) {
      LogService log = (LogService) bc.getService(sRef);
      if (log != null) {
        log.log(level, message);
      }
      bc.ungetService(sRef);
    }
  }
View Full Code Here

  public void log(int level, String msg, Exception e) {
    if(logTracker != null) {
      LogService sLog = (LogService)logTracker.getService();
      if (sLog != null) {
        if (e == null) {
          sLog.log(level, msg);
        } else {
          sLog.log(level, msg, e);
        }
        return;
      }
View Full Code Here

      LogService sLog = (LogService)logTracker.getService();
      if (sLog != null) {
        if (e == null) {
          sLog.log(level, msg);
        } else {
          sLog.log(level, msg, e);
        }
        return;
      }
    }
    System.out.println("LOG " + level + ": " + msg);
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.