Examples of LoggingContext


Examples of co.cask.tigon.logging.LoggingContext

    // Hack hack hack: time constraints
    if (logWriter == null) {
      return;
    }

    LoggingContext context = LoggingContextAccessor.getLoggingContext();
    // Hack hack hack: time constraints
    if (context == null) {
      return;
    }

    String[] traceLines = null;
    if (event.getThrowableProxy() != null) {
      final StackTraceElementProxy[] exc
        = event.getThrowableProxy().getStackTraceElementProxyArray();
      if (exc != null) {
        traceLines = new String[exc.length];
        for (int i = 0; i < traceLines.length; i++) {
          traceLines[i] = exc[i].toString();
        }
      }
    }

    String msg = format.format(this.getLayout().doLayout(event),
                                         traceLines, context, null);

    logWriter.write(context.getLogPartition(), event.getLevel().toString(), msg);
  }
View Full Code Here

Examples of net.sourceforge.javautil.common.logging.LoggingContext

   * @return The writer based logging framework
   */
  public static LoggingFrameworkWriter standardSetup (OutputStream stream, LoggerLevelStandard level) {
    LoggingFrameworkWriter lfw = new LoggingFrameworkWriter(new PrintWriter(stream, true));
    lfw.setRootLevel(level);
    new LoggingContext(lfw).setGlobal();
    LoggingFrameworkJDK.getInstance().routeTo(lfw);
    return lfw;
  }
View Full Code Here

Examples of net.sourceforge.javautil.common.logging.LoggingContext

      new File(configDir, "logging.properties")
    }) {
      if (config.exists()) {
        try {
          LogManager.getLogManager().readConfiguration(new FileInputStream(config));
          new LoggingContext(LoggingFrameworkJDK.getInstance()).setGlobal();
        } catch (Exception e) {
          ThrowableManagerRegistry.caught(e);
        }
      }
    }
View Full Code Here

Examples of org.auraframework.system.LoggingContext

    private static ThreadLocal<LoggingContext> currentContext = new ThreadLocal<LoggingContext>();

    @Override
    public LoggingContext establish() {
        LoggingContext lc = new LoggingContextImpl();
        currentContext.set(lc);
        return lc;
    }
View Full Code Here

Examples of org.auraframework.system.LoggingContext

        AuraImpl.getLoggingAdapter().release();
    }

    @Override
    public void startTimer(String name) {
        LoggingContext lc = getLoggingContext();
        if (lc != null) {
            lc.startTimer(name);
        }
    }
View Full Code Here

Examples of org.auraframework.system.LoggingContext

        }
    }

    @Override
    public void startAction(String actionName) {
        LoggingContext lc = getLoggingContext();
        if (lc != null) {
            lc.startAction(actionName);
        }
    }
View Full Code Here

Examples of org.auraframework.system.LoggingContext

        }
    }
   
    @Override
    public void stopAction(String actionName) {
        LoggingContext lc = getLoggingContext();
        if (lc != null) {
            lc.stopAction(actionName);
        }
    }
View Full Code Here

Examples of org.auraframework.system.LoggingContext

        }
    }
   
    @Override
    public void stopTimer(String name) {
        LoggingContext lc = getLoggingContext();
        if (lc != null) {
            lc.stopTimer(name);
        }
    }
View Full Code Here

Examples of org.auraframework.system.LoggingContext

        }
    }

    @Override
    public long getTime(String name) {
        LoggingContext lc = getLoggingContext();
        if (lc == null) {
            return -1L;
        }
        return lc.getTime(name);
    }
View Full Code Here

Examples of org.auraframework.system.LoggingContext

        return lc.getTime(name);
    }

    @Override
    public void resetTimer(String name) {
        LoggingContext lc = getLoggingContext();
        if (lc != null) {
            lc.resetTimer(name);
        }
    }
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.