/// <summary> /// Writes the exception fields to the log file writer. /// </summary> /// <param name="writer">The log file writer to write to.</param> internal void Write(FieldLogFileWriter writer) { writer.AddBuffer(Type); writer.AddBuffer(TypeModule); writer.AddBuffer(Token); writer.AddBuffer(Message); writer.AddBuffer(Code); writer.AddBuffer(Data); writer.AddBuffer(StackFrames.Length); foreach (FieldLogStackFrame sf in StackFrames) { sf.Write(writer); } if (InnerExceptions != null) { writer.AddBuffer(InnerExceptions.Length); foreach (FieldLogException ex in InnerExceptions) { ex.Write(writer); } } else { writer.AddBuffer(0); } }
/// <summary> /// Writes the log item fields to the log file writer. /// </summary> /// <param name="writer">The log file writer to write to.</param> internal override void Write(FieldLogFileWriter writer) { writer.SetItemType(IsRepeated ? FieldLogItemType.RepeatedScope : FieldLogItemType.Scope); base.Write(writer); writer.AddBuffer((byte)Type); writer.AddBuffer(Level); writer.AddBuffer(Name); if (Type == FieldLogScopeType.ThreadStart) { byte flags = 0; if (IsBackgroundThread) { flags |= 1; } if (IsPoolThread) { flags |= 2; } writer.AddBuffer(flags); } if (Type == FieldLogScopeType.LogStart) { EnvironmentData.Write(writer); } if (Type == FieldLogScopeType.WebRequestStart) { WebRequestData.Write(writer); } writer.WriteBuffer(); }
/// <summary> /// Writes the log item fields to the log file writer. /// </summary> /// <param name="writer">The log file writer to write to.</param> internal override void Write(FieldLogFileWriter writer) { writer.SetItemType(FieldLogItemType.Text); base.Write(writer); writer.AddBuffer(Text); writer.AddBuffer(Details); writer.WriteBuffer(); }
/// <summary> /// Writes the log item fields to the log file writer. /// </summary> /// <param name="writer">The log file writer to write to.</param> internal override void Write(FieldLogFileWriter writer) { writer.SetItemType(FieldLogItemType.Data); base.Write(writer); writer.AddBuffer(Name); writer.AddBuffer(Value); writer.WriteBuffer(); }
/// <summary> /// Writes the log item fields to the log file writer. /// </summary> /// <param name="writer">The log file writer to write to.</param> internal override void Write(FieldLogFileWriter writer) { writer.SetItemType(FieldLogItemType.Exception); base.Write(writer); Exception.Write(writer); writer.AddBuffer(Context); EnvironmentData.Write(writer); writer.WriteBuffer(); }
/// <summary> /// Writes the common log item fields to the log file writer. /// </summary> /// <param name="writer">The log file writer to write to.</param> internal virtual void Write(FieldLogFileWriter writer) { writer.AddBuffer(Time.Ticks); writer.AddBuffer(EventCounter); writer.AddBuffer((byte)Priority); writer.AddBuffer(SessionId.ToByteArray()); writer.AddBuffer(ThreadId); writer.AddBuffer(WebRequestId); }
/// <summary> /// Writes the stack frame fields to the log file writer. /// </summary> /// <param name="writer">The log file writer to write to.</param> internal void Write(FieldLogFileWriter writer) { writer.AddBuffer(Module); writer.AddBuffer(Token); writer.AddBuffer(ILOffset); writer.AddBuffer(TypeName); writer.AddBuffer(MethodName); writer.AddBuffer(MethodSignature); writer.AddBuffer(FileName); writer.AddBuffer(Line); writer.AddBuffer(Column); }
/// <summary> /// Writes the FieldLogWebRequestData data to a log file writer. /// </summary> /// <param name="writer">Log file writer.</param> internal void Write(FieldLogFileWriter writer) { writer.AddBuffer(RequestUrl); writer.AddBuffer(Method); writer.AddBuffer(ClientAddress); writer.AddBuffer(ClientHostName); writer.AddBuffer(Referrer); writer.AddBuffer(UserAgent); writer.AddBuffer(AcceptLanguages); writer.AddBuffer(Accept); writer.AddBuffer(WebSessionId); writer.AddBuffer(AppUserId); writer.AddBuffer(AppUserName); }
/// <summary> /// Writes the FieldLogEventEnvironment data to a log file writer. /// </summary> /// <param name="writer">Log file writer.</param> internal void Write(FieldLogFileWriter writer) { writer.AddBuffer((byte)OSType); writer.AddBuffer((byte)OSVersion); writer.AddBuffer((byte)OSEdition); writer.AddBuffer(OSServicePack); writer.AddBuffer(OSBuild); writer.AddBuffer(OSServicePackBuild); writer.AddBuffer(OSProductName); writer.AddBuffer(OSLanguage); writer.AddBuffer(OSLastBootTime.Ticks); writer.AddBuffer(AppCompatLayer); writer.AddBuffer(ClrType); writer.AddBuffer(MouseButtons); writer.AddBuffer(MaxTouchPoints); writer.AddBuffer(ScreenDpi); writer.AddBuffer(CultureName); writer.AddBuffer(CurrentDirectory); writer.AddBuffer(EnvironmentVariables); writer.AddBuffer(CpuCount); writer.AddBuffer(HostName); writer.AddBuffer(UserName); writer.AddBuffer(ExecutablePath); writer.AddBuffer(CommandLine); writer.AddBuffer(AppVersion); writer.AddBuffer(AppAsmConfiguration); writer.AddBuffer(ClrVersion); writer.AddBuffer((short)LocalTimeZoneOffset.TotalMinutes); writer.AddBuffer(ProcessMemory); writer.AddBuffer(PeakProcessMemory); writer.AddBuffer(TotalMemory); writer.AddBuffer(AvailableMemory); writer.AddBuffer(ProcessId); writer.AddBuffer(PrimaryScreenWidth); writer.AddBuffer(PrimaryScreenHeight); writer.AddBuffer(PrimaryScreenBitsPerPixel); writer.AddBuffer(PrimaryScreenWorkingAreaLeft); writer.AddBuffer(PrimaryScreenWorkingAreaTop); writer.AddBuffer(PrimaryScreenWorkingAreaWidth); writer.AddBuffer(PrimaryScreenWorkingAreaHeight); writer.AddBuffer(ScreenCount); byte flags = 0; if (OSIs64Bit) flags |= 1; if (OSIsAppServer) flags |= 2; if (OSIsFailSafeBoot) flags |= 4; if (IsInteractive) flags |= 8; if (IsProcess64Bit) flags |= 16; if (IsAdministrator) flags |= 32; writer.AddBuffer(flags); }
/// <summary> /// Writes the log item fields to the log file writer. /// </summary> /// <param name="writer">The log file writer to write to.</param> internal override void Write(FieldLogFileWriter writer) { writer.SetItemType(IsRepeated ? FieldLogItemType.RepeatedScope : FieldLogItemType.Scope); base.Write(writer); writer.AddBuffer((byte)Type); writer.AddBuffer(Level); writer.AddBuffer(Name); if (Type == FieldLogScopeType.ThreadStart) { byte flags = 0; if (IsBackgroundThread) flags |= 1; if (IsPoolThread) flags |= 2; writer.AddBuffer(flags); } if (Type == FieldLogScopeType.LogStart) { EnvironmentData.Write(writer); } if (Type == FieldLogScopeType.WebRequestStart) { WebRequestData.Write(writer); } writer.WriteBuffer(); }
/// <summary> /// Writes the FieldLogEventEnvironment data to a log file writer. /// </summary> /// <param name="writer">Log file writer.</param> internal void Write(FieldLogFileWriter writer) { writer.AddBuffer((byte)OSType); writer.AddBuffer((byte)OSVersion); writer.AddBuffer((byte)OSEdition); writer.AddBuffer(OSServicePack); writer.AddBuffer(OSBuild); writer.AddBuffer(OSServicePackBuild); writer.AddBuffer(OSProductName); writer.AddBuffer(OSLanguage); writer.AddBuffer(OSLastBootTime.Ticks); writer.AddBuffer(AppCompatLayer); writer.AddBuffer(ClrType); writer.AddBuffer(MouseButtons); writer.AddBuffer(MaxTouchPoints); writer.AddBuffer(ScreenDpi); writer.AddBuffer(CultureName); writer.AddBuffer(CurrentDirectory); writer.AddBuffer(EnvironmentVariables); writer.AddBuffer(CpuCount); writer.AddBuffer(HostName); writer.AddBuffer(UserName); writer.AddBuffer(ExecutablePath); writer.AddBuffer(CommandLine); writer.AddBuffer(AppVersion); writer.AddBuffer(AppAsmConfiguration); writer.AddBuffer(ClrVersion); writer.AddBuffer((short)LocalTimeZoneOffset.TotalMinutes); writer.AddBuffer(ProcessMemory); writer.AddBuffer(PeakProcessMemory); writer.AddBuffer(TotalMemory); writer.AddBuffer(AvailableMemory); writer.AddBuffer(ProcessId); writer.AddBuffer(PrimaryScreenWidth); writer.AddBuffer(PrimaryScreenHeight); writer.AddBuffer(PrimaryScreenBitsPerPixel); writer.AddBuffer(PrimaryScreenWorkingAreaLeft); writer.AddBuffer(PrimaryScreenWorkingAreaTop); writer.AddBuffer(PrimaryScreenWorkingAreaWidth); writer.AddBuffer(PrimaryScreenWorkingAreaHeight); writer.AddBuffer(ScreenCount); byte flags = 0; if (OSIs64Bit) { flags |= 1; } if (OSIsAppServer) { flags |= 2; } if (OSIsFailSafeBoot) { flags |= 4; } if (IsInteractive) { flags |= 8; } if (IsProcess64Bit) { flags |= 16; } if (IsAdministrator) { flags |= 32; } writer.AddBuffer(flags); }