public void Render(StringBuilder stringBuilder, IStringRenderer stringRenderer, LogEntry logEntry) { var stringLogTitle = logEntry.Title as StringLogTitle; if (stringLogTitle != null) { stringBuilder.Append(stringLogTitle.Title); } else { var openLogScope = logEntry.Title as OpenLogScopeTitle; if (openLogScope != null) { stringBuilder.Append("Open["); stringBuilder.Append(logEntry.LogScopeId); stringBuilder.Append("]"); } else { var closeLogScope = logEntry.Title as CloseLogScopeTitle; if (closeLogScope != null) { stringBuilder.Append("Close["); stringBuilder.Append(logEntry.LogScopeId); stringBuilder.Append("]"); } } } }
public void Render(StringBuilder stringBuilder,IStringRenderer stringRenderer, LogEntry logEntry) { for (int i = 0; i < m_writers.Length; i++) { m_writers[i].Render(stringBuilder, stringRenderer, logEntry); } }
public void Render(StringBuilder stringBuilder, IStringRenderer stringRenderer, LogEntry logEntry) { stringBuilder.Append(m_property); if (logEntry.Paramaeter != null) { stringRenderer.Render(m_parmExtractor.DynamicInvoke(logEntry.Paramaeter), stringBuilder); } }
public bool Filter(LogEntry logEntry) { if (m_filter != null) { return m_filter.Filter(logEntry); } return false; }
public bool Filter(LogEntry logEntry) { if ((logEntry.Title.Id & ReservedLogTitleIds.ReservedLogTitle) == ReservedLogTitleIds.ReservedLogTitle) { return (logEntry.Title.Id & m_mask) != 0; } return false; }
public void LogWithNotTimeSet(LogEntry logEntry) { logEntry.LogScopeId = m_logScopeSyncImplementation.GetScopeId(); var temp = LogEntry; if (temp != null) { temp.Invoke(logEntry); } }
public bool Filter(LogEntry logEntry) { for (int i = 0; i < m_filters.Length; i++) { if (!m_filters[i].Filter(logEntry)) { return false; } } return true; }
public void Log(LogEntry logEntry) { logEntry.Time = m_systemTime.Now(); logEntry.LogScopeId = m_logScopeSyncImplementation.GetScopeId(); var temp = LogEntry; if (temp != null) { temp.Invoke(logEntry); } }
public ColorLine GetColor(LogEntry logEntry) { var temp = m_conditions; for (int i = 0; i < temp.Length; i++) { var currCondition = temp[i]; if (currCondition.Item1.Invoke(logEntry)) { return currCondition.Item2; } } return DefaultColor; }
private void aggregateLog_LogEntry(LogEntry logEntry) { var buffer = m_logEntryBufferAllocator.Allocate(); try { buffer.DateTime = logEntry.Time; var dataSerializer = buffer.AttachedSerializer; m_streamLogBinaryPackager.Pack(logEntry, dataSerializer); dataSerializer.Flush(); m_logEntrySubmiter.AddEntry(buffer); } finally { buffer.Dispose(); } }
public ColorLine GetColor(LogEntry logEntry) { switch (logEntry.Title.Id) { case ReservedLogTitleIds.Fatal: return Fatal; case ReservedLogTitleIds.Error: return Error; case ReservedLogTitleIds.Warning: return Warning; case ReservedLogTitleIds.Debug: return Debug; case ReservedLogTitleIds.Info: return Info; case ReservedLogTitleIds.Trace: return Trace; default: return Empty; } }
public void Render(StringBuilder stringBuilder, IStringRenderer stringRenderer, LogEntry logEntry) { stringBuilder.Append(DateTime.Now); }
public void Append(string value,LogEntry logEntry) { if (m_colorSchema == null) { m_consoleLogEntrySubmitter.AddLogEntry(value,ColorLine.Empty); } else { var colorLine = m_colorSchema.GetColor(logEntry); m_consoleLogEntrySubmitter.AddLogEntry(value,colorLine); } }
public bool Filter(LogEntry logEntry) { if (!m_isConsoleOutputAvaliable) { return true; } if (m_filter != null) { return m_filter.Filter(logEntry); } return false; }
public void Render(StringBuilder stringBuilder, IStringRenderer stringRenderer, LogEntry logEntry) { stringBuilder.Append(m_stringPattern); }
public void Render(StringBuilder stringBuilder, IStringRenderer stringRenderer, LogEntry logEntry) { }
public void Render(StringBuilder stringBuilder, IStringRenderer stringRenderer, LogEntry logEntry) { stringBuilder.Append(logEntry.LogScopeId); }
public void Render(StringBuilder stringBuilder, IStringRenderer stringRenderer, LogEntry logEntry) { stringBuilder.Append(System.Threading.Thread.CurrentThread.ManagedThreadId); }
public void Render(StringBuilder stringBuilder, IStringRenderer stringRenderer, LogEntry logEntry) { stringRenderer.Render(logEntry.Paramaeter, stringBuilder); }
public void Render(StringBuilder stringBuilder, IStringRenderer stringRenderer, LogEntry logEntry) { stringBuilder.AppendLine(); }
public void Append(string value, LogEntry logEntry) { m_submitEntry.Submit(value,logEntry.Time); }