public Logger( ILogStream stream) { this.stream = stream; threadIndentationCache = new Dictionary<int, int>(); }
public static void AddLogStream(ILogStream logStream) { Assert.IsNotNull(logStream); lock (sSyncLock) { sLogStreams.Add(logStream); } }
public PostRunExample(ILogStream logStream, VirtualFS virtualFS) { _logStream = logStream; _virtualFS = virtualFS; }
/// <summary> /// Execute buffered stream with default timeout of 10 milliseconds. If buffer becomes empty /// return immediately. /// </summary> /// <return> /// true if buffer was empty, false if timeout was reached /// </return> public static bool ExecuteBuffer(this IBufferLogStream buffer, ILogStream stream) { return(buffer.ExecuteBuffer(stream, TimeSpan.FromMilliseconds(10), null)); }
public static void WriteLine(this ILogStream stream, eContentDomain domain, string format = null, params object[] args) { stream.WriteLine(domain, ConsoleColor.White, format, args); }
public static void Log(this ILogStream stream, Exception ex) { stream.Log(DefaultExceptionItems(ex)); }
public EmptyFormatMessageFixer(ILogStream inner) : base(inner) { }
public void AddLogStream(ILogStream newStream) { this.mStreams.Add(newStream); }
public override void OnTestStart() { base.OnTestStart(); _log = ConstructLoggger(); }
/// <summary> /// Define a generic action to perform upon completion of every created PerformanceEvent. /// </summary> public static ILogStream PerfEvent_DefaultCompletionBehavior(this ILogStream log, Action <IUnstoppablePerformanceEvent, ILogStream, ILogToken, LoggingLevel> action) { GetData(log).DefaultCompletionBehaviors.Add(action); return(log); }
/// <summary> /// Time spent between initialization and the first event being created. /// </summary> public static IUnstoppablePerformanceEvent PerfEvent_GetBeforeFirstEventTime(this ILogStream log) { return(GetData(log).Tracker.BeforeFirstEvent); }
/// <summary> /// Returns the total time that spent by the performance wrapper /// </summary> public static IUnstoppablePerformanceEvent PerfEvent_GetRunningTotal(this ILogStream log) { return(GetData(log).Tracker.TotalEvent); }
/// <summary> /// Returns an event representing the time spent setting up the performance tracker /// </summary> public static IUnstoppablePerformanceEvent PerfEvent_GetSetupTime(this ILogStream log) { return(GetData(log).Tracker.SetupEvent); }
/// <summary> /// Returns the current size of the performance tracker stack, primarily this is /// intended for testing that the stack size is being maintained properly. /// </summary> public static int PerfEvent_GetStackSize(this ILogStream log) { return(GetData(log).Tracker.GetStackSize()); }
public QuartusProjectTools(ILogStream logStream) { _logStream = logStream; }
/// <see cref="PerformanceEventTracker.Complete"/> public static IUnstoppablePerformanceEvent PerfEvent_CompleteEverything(this ILogStream log) { return(GetData(log).Tracker.Complete()); }
public static void IncrementCounterBy(this ILogStream log, ICounterToken ct, Stopwatch watch) { log.IncrementCounterBy(ct, watch.ElapsedTicks); }
public ExceptionFormatterLogStream(ILogStream inner) : base(inner) { AddFormatter(typeof(AggregateException), AggregateExceptionRenderer); }
public static void DecrementCounter(this ILogStream log, ICounterToken ct, ILogToken lt) { var nct = LogManager.CreateNamedCounterToken(ct.Counter, lt.Name); log.IncrementCounterBy(nct, -1); }
public static bool RemoveLogStream(ILogStream logStream) { Assert.IsNotNull(logStream); lock (sSyncLock) { return sLogStreams.Remove(logStream); } }
public static void IncrementCounterBy(this ILogStream log, ICounterToken ct, ILogToken lt, Stopwatch watch) { var nct = LogManager.CreateNamedCounterToken(ct.Counter, lt.Name); log.IncrementCounterBy(nct, watch.ElapsedTicks); }
public UniquenessCodeGeneratorLogStream(ILogStream inner) : base(inner) { }
public static void SetCounter(this ILogStream log, ICounterToken ct, ILogToken lt, long value) { var nct = LogManager.CreateNamedCounterToken(ct.Counter, lt.Name); log.SetCounter(nct, value); }
public static void Log(this ILogStream stream, params IEnumerable <LogRecordItem>[] items) { stream.Log(items.SelectMany(i => i).ToArray()); }
public static void IncrementCounter(this ILogStream log, ICounterToken ct) { log.IncrementCounterBy(ct, 1); }
public DelegatingLogStream(ILogStream inner) { _inner = inner; }
public DefaultTextLogStreamFormatter(ILogStream inner) : base(inner) { }
/// <summary> /// Execute as many events from buffered stream within specified timeout. If buffer becomes empty /// return immediately. /// </summary> /// <return> /// true if buffer was empty, false if timeout was reached /// </return> public static bool ExecuteBuffer(this IBufferLogStream buffer, ILogStream stream, TimeSpan timeout) { return(buffer.ExecuteBuffer(stream, timeout, null)); }
public CarryUserCode(ILogStream logStream) { _logStream = logStream; }
public Logger(ILogStream logStream, IErrorHandler errorHandler, ILocalState localState) { this.logStream = logStream; this.errorHandler = errorHandler; this.localState = localState; }
internal FilteringLogStream(ILogStream inner) { _inner = inner; InitActions(); }
public MonitorHub(MonitorConfig config, ILogStream logStream) { this.config = config; this.logStream = logStream; }
/// <see cref="PerformanceEventTracker.PopComplete"/> public static IUnstoppablePerformanceEvent PerfEvent_PopComplete(this ILogStream log, IUnstoppablePerformanceEvent evt) { return(GetData(log).Tracker.PopComplete(evt)); }