Package org.osgi.service.log

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


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


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

      System.out.println("[dirdeployer " + level + "] " + msg);
      if(t != null) {
        t.printStackTrace();
      }
    } else {
      log.log(level, msg, t);
    }
  }


  /**
 
View Full Code Here

        try {
            ServiceReference srLog = bc.getServiceReference(logServiceName);
            if (srLog != null) {
                LogService sLog = (LogService) bc.getService(srLog);
                if (sLog != null) {
                    sLog.log(level, msg);
                }
                bc.ungetService(srLog);
            }
        } catch (IllegalStateException exp) {
            // if the thread has survied the stop of the bundle we get this
View Full Code Here

     *            may be <code>null</code>.
     */
    protected void log(int level, String message, Throwable t) {
        LogService log = this.log;
        if (log != null) {
            log.log(level, message, t);
        } else {
            System.err.print(level + " - " + message);
            if (t != null) {
                t.printStackTrace(System.err);
            }
View Full Code Here

    protected void log(int level, String message, Throwable t) {
        LogService log = this.log;
        if (log != null) {
            if (componentContext != null) {
                log.log(componentContext.getServiceReference(), level, message,
                    t);
            } else {
                log.log(level, message, t);
            }
        }
View Full Code Here

        if (log != null) {
            if (componentContext != null) {
                log.log(componentContext.getServiceReference(), level, message,
                    t);
            } else {
                log.log(level, message, t);
            }
        }
    }

    // ---------- Repository Access -------------------------------------------
View Full Code Here

    }

    private void log(int level, String message, Throwable t) {
        LogService log = this.logService;
        if (log != null) {
            log.log(level, message, t);
        } else {
            PrintStream out = (level == LogService.LOG_ERROR)
                    ? System.err
                    : System.out;
            out.println(message);
View Full Code Here

        {
            _log( null, level, message, null );
        }
        else
        {
            log.log( level, message );
        }
    }


    public static void log( int level, String message, Throwable exception )
View Full Code Here

        {
            _log( null, level, message, exception );
        }
        else
        {
            log.log( level, message, exception );
        }
    }


    public static void log( ServiceReference sr, int level, String message )
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.