SaveStackTrace() public method

public SaveStackTrace ( Stream stream, LogStackTrace trace ) : void
stream Stream
trace LogStackTrace
return void
Ejemplo n.º 1
0
        /// <summary>
        /// Writes the log data to the stream
        /// </summary>
        /// <param name="stream"></param>
        /// <param name="saveHelper"></param>
        internal void Save(Stream stream, LogMessageSaveHelper saveHelper = null)
        {
            if (saveHelper == null)
            {
                saveHelper = LogMessageSaveHelper.Create(true);
            }

            stream.Write((byte)4);
            saveHelper.SaveEventPublisherDetails(stream, EventPublisherDetails);
            saveHelper.SaveStackMessages(stream, InitialStackMessages);
            saveHelper.SaveStackTrace(stream, InitialStackTrace);
            saveHelper.SaveStackMessages(stream, CurrentStackMessages);
            saveHelper.SaveStackTrace(stream, CurrentStackTrace);
            stream.Write(UtcTime);
            LogMessageAttributes.Save(stream);
            saveHelper.SaveString(stream, Message);
            saveHelper.SaveString(stream, Details);
            saveHelper.SaveString(stream, ExceptionString);
            stream.Write(ManagedThreadID);
            stream.Write(PreviousFirstChanceExceptionSequenceNumber);
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Writes the log data to the stream
        /// </summary>
        /// <param name="stream"></param>
        /// <param name="saveHelper"></param>
        internal void Save(Stream stream, LogMessageSaveHelper saveHelper = null)
        {
            if (saveHelper == null)
                saveHelper = LogMessageSaveHelper.Create(true);

            stream.Write((byte)4);
            saveHelper.SaveEventPublisherDetails(stream, EventPublisherDetails);
            saveHelper.SaveStackMessages(stream, InitialStackMessages);
            saveHelper.SaveStackTrace(stream, InitialStackTrace);
            saveHelper.SaveStackMessages(stream, CurrentStackMessages);
            saveHelper.SaveStackTrace(stream, CurrentStackTrace);
            stream.Write(UtcTime);
            LogMessageAttributes.Save(stream);
            saveHelper.SaveString(stream, Message);
            saveHelper.SaveString(stream, Details);
            saveHelper.SaveString(stream, ExceptionString);
            stream.Write(ManagedThreadID);
            stream.Write(PreviousFirstChanceExceptionSequenceNumber);
        }