Skip to content

cfcc895b dca0 a027 5ad8 5c820254bceb

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

FormatterBase Class

This internal class represents the base class of all other formatter implementations.

Inheritance Hierarchy

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

Syntax

C#

internal abstract class FormatterBase

The FormatterBase type exposes the following members.

Constructors

 

Name Description
Protected method FormatterBase The parameterized constructor just initializes all properties.
  Back to Top

Properties

 

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

Methods

 

Name Description
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.)
Private method GetAdjustedTime This method adjusts provided timestamp according to current timestamp settings.
Protected method GetContext(String) This method converts provided parameter context into its string representation.
Protected method GetContext(String, String) This method converts provided parameter context into its string representation.
Protected method GetConverted(Object) This method converts provided parameter value into its string representation.
Protected method GetConverted(Object, String) This method converts provided parameter value into its string representation.
Protected method GetException(Exception) This method converts provided parameter exception into its string representation.
Protected method GetException(Exception, String) This method converts provided parameter exception into its string representation.
Private method GetFormattedTime This method formats provided timestamp as string.
Public method GetHashCode Serves as the default hash function. (Inherited from Object.)
Protected method GetKey This method converts parameter key into its string representation.
Protected method GetLevel This method converts parameter level into its string representation.
Protected method GetMessage(String) This method converts provided parameter message into its string representation.
Protected method GetMessage(String, String) This method converts provided parameter message into its string representation.
Protected method GetScope(String) This method converts provided parameter scope into its string representation.
Protected method GetScope(String, String) This method converts provided parameter scope into its string representation.
Protected method GetTime This method converts parameter time into its string representation.
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.
Protected method ToOutput(String, Char) This method converts a value into its output format.
Protected method ToOutput(String, String, Char) This method converts a combination of label and value into its output format.
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.
Protected method TrimEnd This method removes the last occurrences of character value from provided string builder.
  Back to Top

Remarks

This base class provides functionality that will be shared by all other formatter classes. Intentionally, this class is defined as abstract to prevent a direct usage.

See Also

Reference

Plexdata.LogWriter.Internals.Formatters Namespace

Clone this wiki locally