Skip to main content

Class FileLogger

A Meadow Logging LogProvider that outputs log information to a local file

Assembly: Meadow.LogProviders.dll​
View Source​
Declaration
public class FileLogger : ILogProvider

Implements:
Meadow.Logging.ILogProvider

Properties​

LogFilePath​

Gets the path to the current log file

View Source​
Declaration
public string LogFilePath { get; }

MinimumLogLevel​

Only log messages at or above this level

View Source​
Declaration
public LogLevel MinimumLogLevel { get; set; }

Methods​

Log(LogLevel, string, string?)​

Called when the associated Logger has a message call

View Source​
Declaration
public void Log(LogLevel level, string message, string? _)
Parameters​
TypeNameDescription
Meadow.Logging.LogLevellevelThe LogLevel for the message
System.StringmessageThe message to log
System.String_

GetLogContents()​

Reads all lines in the current log file

View Source​
Declaration
public string[] GetLogContents()
Returns​

System.String[]

TruncateLog()​

Erases all data in the current log file

View Source​
Declaration
public void TruncateLog()

Implements​