|
Joutsen Logging v0.5.0+22-gec3d058
|
A class that defines a Joutsen.Logging.IFormatter that formats log entries as JSON file records. More...
Public Member Functions | |
| JsonFormatter (bool prettyPrint=false) | |
| Creates a new instance of the formatter. More... | |
| string | Format (LogRecord record) |
| Creates a JSON representation of the @paramref record. More... | |
| string | GetHeader (global::System.Text.Encoding encoding) |
| Creates the opening bracket for the JSON array that will contain the log entries. More... | |
| string | GetTail () |
| Closes the JSON array containing the log entries. More... | |
| string | GetSeparator () |
| Creates a separator that is to be written between records. More... | |
Public Member Functions inherited from Joutsen.Logging.Formatter | |
| String | Format (LogRecord record) |
| Creates a formated string representation of the @paramref record which can be written. More... | |
| String | GetHeader (Encoding encoding) |
| Creates the header that is to be written before the first record is written. More... | |
| String | GetTail () |
| Creates additional information that is written after the last record. More... | |
| String | GetSeparator () |
| Creates a separator that is to be written between records. More... | |
Properties | |
| bool | IsPrettyPrinted [get] |
| Determines if the output of this formatter is pretty printed with indentation and line breaks. More... | |
A class that defines a Joutsen.Logging.IFormatter that formats log entries as JSON file records.
| Joutsen.Logging.JsonFormatter.JsonFormatter | ( | bool | prettyPrint = false | ) |
Creates a new instance of the formatter.
| prettyPrint | determines if the output should be pretty printed. Optional, default is false |
| string Joutsen.Logging.JsonFormatter.Format | ( | LogRecord | record | ) |
Creates a JSON representation of the @paramref record.
@params record the record to create a formatted string from
| record |
Implements Joutsen.Logging.Formatter.
| string Joutsen.Logging.JsonFormatter.GetHeader | ( | global::System.Text.Encoding | encoding | ) |
Creates the opening bracket for the JSON array that will contain the log entries.
| encoding | information about the encoding that will be used to write log entries |
| string Joutsen.Logging.JsonFormatter.GetSeparator | ( | ) |
Creates a separator that is to be written between records.
Implements Joutsen.Logging.Formatter.
| string Joutsen.Logging.JsonFormatter.GetTail | ( | ) |
Closes the JSON array containing the log entries.
Implements Joutsen.Logging.Formatter.
|
get |
Determines if the output of this formatter is pretty printed with indentation and line breaks.