Package org.eclipse.equinox.log

Examples of org.eclipse.equinox.log.Logger


  public void log(Object context, int level, String message, Throwable exception) {
    getLogger(null).log(context, level, message, exception);
  }

  public synchronized Logger getLogger(String name) {
    Logger logger = loggerCache.get(name);
    if (logger == null) {
      logger = new LoggerImpl(this, name);
      loggerCache.put(name, logger);
    }
    return logger;
View Full Code Here


    return createFrameworkLog(bundle, defaultWriter);
  }

  FrameworkLog createFrameworkLog(Bundle bundle, EclipseLogWriter eclipseWriter) {
    final EclipseLogWriter logWriter = eclipseWriter == null ? defaultWriter : eclipseWriter;
    final Logger logger = bundle == null ? logManager.getSystemBundleLog().getLogger(eclipseWriter.getLoggerName()) : logManager.getSystemBundleLog().getLogger(bundle, logWriter.getLoggerName());
    return new FrameworkLog() {

      public void setWriter(Writer newWriter, boolean append) {
        logWriter.setWriter(newWriter, append);
      }

      public void setFile(File newFile, boolean append) throws IOException {
        logWriter.setFile(newFile, append);
      }

      public void setConsoleLog(boolean consoleLog) {
        logWriter.setConsoleLog(consoleLog);
      }

      public void log(FrameworkLogEntry logEntry) {
        logger.log(logEntry, convertLevel(logEntry), logEntry.getMessage(), logEntry.getThrowable());
      }

      public void log(FrameworkEvent frameworkEvent) {
        Bundle b = frameworkEvent.getBundle();
        Throwable t = frameworkEvent.getThrowable();
View Full Code Here

TOP

Related Classes of org.eclipse.equinox.log.Logger

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.