Click or drag to resize

FileLoggerWriteMessage Method (String, LogLevel)

IT Hit WebDAV Classes Reference
Writs a message to a log file with a specified log level.

Namespace:  ITHit.WebDAV.Client.Logger
Assemblies:   ITHit.WebDAV.Client (in ITHit.WebDAV.Client.dll) Version: 2.0.420.0
  ITHit.WebDAV.Client (in ITHit.WebDAV.Client.dll) Version: 2.0.420.0
Syntax
public static void WriteMessage(
	string message,
	LogLevel level
)

Parameters

message
Type: SystemString
Message to be logged.
level
Type: ITHit.WebDAV.Client.LoggerLogLevel
Logging level.
Examples
FileLogger.LogFile = "C:\WebDAV\WebDAVClientLog.txt"; // C:\WebDAV\ must exist and the application must have enough permission to write and create files in this folder
FileLogger.Level = LogLevel.Warn;
FileLogger.WriteMessage("My error message", LogLevel.Error); // this message will be written to the log file
FileLogger.WriteMessage("My debug message", LogLevel.Debug); // this message will not be written to the log file
FileLogger.WriteMessage("My info message"); // this message will not be written to the log file
See Also