CreateMulticastLog() public static method

Creates a ILogEntry for a line.
public static CreateMulticastLog ( Guid monitorId, LogEntryType previousEntryType, DateTimeStamp previousLogTime, int depth, string text, DateTimeStamp t, LogLevel level, string fileName, int lineNumber, CKTrait tags, CKExceptionData ex ) : IMulticastLogEntry
monitorId Guid Identifier of the monitor.
previousEntryType LogEntryType Log type of the previous entry in the monitor..
previousLogTime DateTimeStamp Time stamp of the previous entry in the monitor.
depth int Depth of the line (number of opened groups above).
text string Text of the log entry.
t DateTimeStamp Time stamp of the log entry.
level LogLevel Log level of the log entry.
fileName string Source file name of the log entry
lineNumber int Source line number of the log entry
tags CKTrait Tags of the log entry
ex CKExceptionData Exception of the log entry.
return IMulticastLogEntry
Exemplo n.º 1
0
        void IActivityMonitorClient.OnUnfilteredLog(ActivityMonitorLogData data)
        {
            var h = EnsureChannel();

            if (h != null)
            {
                IMulticastLogEntry e = LogEntry.CreateMulticastLog(_monitorSource.UniqueId, _prevLogType, _prevlogTime, _currentGroupDepth, data.Text, data.LogTime, data.Level, data.FileName, data.LineNumber, data.Tags, data.EnsureExceptionData());
                h.Handle(new GrandOutputEventInfo(e, _monitorSource.Topic));
                _prevlogTime = data.LogTime;
                _prevLogType = LogEntryType.Line;
            }
        }
Exemplo n.º 2
0
        void IActivityMonitorClient.OnUnfilteredLog(ref ActivityMonitorLogData data)
        {
            if (_central.IsDisposed)
            {
                return;
            }
            Debug.Assert(_monitorSource != null, "Since we are called by the monitor...");
            IMulticastLogEntry e = LogEntry.CreateMulticastLog(_central.GrandOutpuId, _monitorSource.UniqueId, _prevLogType, _prevlogTime, _currentGroupDepth, data.Text, data.LogTime, data.Level, data.FileName, data.LineNumber, data.Tags, data.ExceptionData);

            _central.Sink.Handle(e);
            _prevlogTime = data.LogTime;
            _prevLogType = LogEntryType.Line;
        }