C# 클래스 NetworkCommsDotNet.Tools.LogTools

Quickly log exceptions and information to a file.
파일 보기 프로젝트 열기: MarcFletcher/NetworkComms.Net 1 사용 예제들

공개 메소드들

메소드 설명
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