Exemplo n.º 1
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();
        }
Exemplo n.º 2
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(FieldLogItemType.Data);
     base.Write(writer);
     writer.AddBuffer(Name);
     writer.AddBuffer(Value);
     writer.WriteBuffer();
 }
Exemplo n.º 3
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(FieldLogItemType.Text);
     base.Write(writer);
     writer.AddBuffer(Text);
     writer.AddBuffer(Details);
     writer.WriteBuffer();
 }
Exemplo n.º 4
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(FieldLogItemType.Exception);
     base.Write(writer);
     Exception.Write(writer);
     writer.AddBuffer(Context);
     EnvironmentData.Write(writer);
     writer.WriteBuffer();
 }
Exemplo n.º 5
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();
        }
Exemplo n.º 6
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(FieldLogItemType.Exception);
     base.Write(writer);
     Exception.Write(writer);
     writer.AddBuffer(Context);
     EnvironmentData.Write(writer);
     writer.WriteBuffer();
 }
Exemplo n.º 7
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(FieldLogItemType.Data);
     base.Write(writer);
     writer.AddBuffer(Name);
     writer.AddBuffer(Value);
     writer.WriteBuffer();
 }
Exemplo n.º 8
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(FieldLogItemType.Text);
     base.Write(writer);
     writer.AddBuffer(Text);
     writer.AddBuffer(Details);
     writer.WriteBuffer();
 }