Skip to content

59b057da 9be1 d536 5736 0423542581bd

Axel Kesseler edited this page Mar 1, 2023 · 18 revisions

RawFormatter Class

This internal class provides functionality to transform logging massages into raw format.

Inheritance Hierarchy

System.Object
  Plexdata.LogWriter.Internals.Formatters.FormatterBase
    Plexdata.LogWriter.Internals.Formatters.RawFormatter
Namespace: Plexdata.LogWriter.Internals.Formatters
Assembly: Plexdata.LogWriter.Abstraction (in Plexdata.LogWriter.Abstraction.dll) Version: 1.0.7.1

Syntax

C#

internal class RawFormatter : FormatterBase, 
	ILogEventFormatter

The RawFormatter type exposes the following members.

Constructors

 

Name Description
Public method RawFormatter The parameterized constructor just initializes all properties.
  Back to Top

Properties

 

Name Description
Protected property EmptyValue Gets the string of an “empty” value. (Inherited from FormatterBase.)
Protected property NullValue Gets the string of a “null” value. (Inherited from FormatterBase.)
Protected property Settings Gets the instance of logger settings. (Inherited from FormatterBase.)
  Back to Top

Methods

 

Name Description
Private method AddContext The method puts the context into the string builder and appends the split character.
Private methodCode example AddDetails The method puts the details into the string builder and appends the split character.
Private method AddException The method puts the exception into the string builder but does not append the split character.
Private method AddKey The method puts the key into the string builder and adds the split character.
Private method AddLevel The method puts the level into the string builder and appends the split character.
Private method AddMessage The method puts the message into the string builder and appends the split character.
Private method AddScope The method puts the scope into the string builder and appends the split character.
Private method AddTime The method puts the time into the string builder and appends the split character.
Public method Equals Determines whether the specified object is equal to the current object. (Inherited from Object.)
Protected method Finalize Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.)
Public method Format This method formats provided logging event and writes the result back into provided string builder.
Private method GetAdjustedTime This method adjusts provided timestamp according to current timestamp settings. (Inherited from FormatterBase.)
Protected method GetContext(String) This method converts provided parameter context into its string representation. (Inherited from FormatterBase.)
Protected method GetContext(String, String) This method converts provided parameter context into its string representation. (Inherited from FormatterBase.)
Protected method GetConverted(Object) This method converts provided parameter value into its string representation. (Inherited from FormatterBase.)
Protected method GetConverted(Object, String) This method converts provided parameter value into its string representation. (Inherited from FormatterBase.)
Protected method GetException(Exception) This method converts provided parameter exception into its string representation. (Inherited from FormatterBase.)
Protected method GetException(Exception, String) This method converts provided parameter exception into its string representation. (Inherited from FormatterBase.)
Private method GetFormattedTime This method formats provided timestamp as string. (Inherited from FormatterBase.)
Public method GetHashCode Serves as the default hash function. (Inherited from Object.)
Protected method GetKey This method converts parameter key into its string representation. (Inherited from FormatterBase.)
Protected method GetLevel This method converts parameter level into its string representation. (Inherited from FormatterBase.)
Protected method GetMessage(String) This method converts provided parameter message into its string representation. (Inherited from FormatterBase.)
Protected method GetMessage(String, String) This method converts provided parameter message into its string representation. (Inherited from FormatterBase.)
Protected method GetScope(String) This method converts provided parameter scope into its string representation. (Inherited from FormatterBase.)
Protected method GetScope(String, String) This method converts provided parameter scope into its string representation. (Inherited from FormatterBase.)
Protected method GetTime This method converts parameter time into its string representation. (Inherited from FormatterBase.)
Public method GetType Gets the Type of the current instance. (Inherited from Object.)
Protected method MemberwiseClone Creates a shallow copy of the current Object. (Inherited from Object.)
Protected method ToLabel This method converts a label into its output representation. (Overrides FormatterBase.ToLabel(String).)
Protected method ToOutput(String, Char) This method converts a value into its output format. (Overrides FormatterBase.ToOutput(String, Char).)
Protected method ToOutput(String, String, Char) This method converts a combination of label and value into its output format. (Overrides FormatterBase.ToOutput(String, String, Char).)
Public method ToString Returns a string that represents the current object. (Inherited from Object.)
Protected method ToValue This method converts a value into its output representation. (Overrides FormatterBase.ToValue(String, Char).)
Protected method TrimEnd This method removes the last occurrences of character value from provided string builder. (Inherited from FormatterBase.)
  Back to Top

Remarks

Raw format typically means that such a logging message consists of a leading time stamp and is followed by a particular logging level as well as a meaningful message. Additionally, such a raw logging message may include a message context and/or a message scope. Other additional information might be included as well.

See Also

Reference

Plexdata.LogWriter.Internals.Formatters Namespace

Clone this wiki locally