Design Pattern Examples
Overview of object-oriented design patterns
LoggerHelpers Class Reference

Helper functions for all loggers. More...

Collaboration diagram for LoggerHelpers:
Collaboration graph

Static Public Member Functions

static string FormatLogLine (string logLevel, string msg)
 Format a line for logging, including time stamp.
 

Static Private Member Functions

static string _GetTimeStamp ()
 Return a regular time stamp of the current time.
 

Detailed Description

Helper functions for all loggers.

Definition at line 17 of file Bridge_LoggerHelpers.cs.

Member Function Documentation

◆ _GetTimeStamp()

static string _GetTimeStamp ( )
inlinestaticprivate

Return a regular time stamp of the current time.

Returns
A string containing the current date and time.

Definition at line 23 of file Bridge_LoggerHelpers.cs.

Referenced by LoggerHelpers.FormatLogLine().

◆ FormatLogLine()

static string FormatLogLine ( string  logLevel,
string  msg 
)
inlinestatic

Format a line for logging, including time stamp.

Parameters
logLevelLevel of logging (TRACE, INFO, ERROR)
msgMessage to log
Returns
The formatted string to log.

Definition at line 34 of file Bridge_LoggerHelpers.cs.

References LoggerHelpers._GetTimeStamp().

Referenced by ConsoleLogger._WriteLine(), and FileLogger._WriteLine().


The documentation for this class was generated from the following file: