C# Класс NetworkCommsDotNet.Tools.LogTools

Quickly log exceptions and information to a file.
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
AppendStringToLogFile ( string fileName, string logString ) : void

Appends the provided logString to end of fileName.txt. If the file does not exist it will be created.

LogException ( Exception ex, string fileName, string optionalCommentStr = "" ) : string

Logs the provided exception to a file to assist troubleshooting.

Описание методов

AppendStringToLogFile() публичный статический Метод

Appends the provided logString to end of fileName.txt. If the file does not exist it will be created.
public static AppendStringToLogFile ( string fileName, string logString ) : void
fileName string The filename to use. The extension .txt will be appended automatically
logString string The string to append.
Результат void

LogException() публичный статический Метод

Logs the provided exception to a file to assist troubleshooting.
public static LogException ( Exception ex, string fileName, string optionalCommentStr = "" ) : string
ex System.Exception The exception to be logged
fileName string The filename to use. A time stamp and extension .txt will be appended automatically
optionalCommentStr string An optional string which will appear at the top of the error file
Результат string