C# 클래스 Ivony.Logs.TextLogFileManager

提供文本日志文件创建、编写等服务的类
파일 보기 프로젝트 열기: Ivony/LogUtility 1 사용 예제들

공개 메소드들

메소드 설명
Flush ( ) : void

刷新所有日志文本流,确保所有修改已经写入。

Flush ( string filepath ) : void

刷新指定日志文本流,确保所有修改已经写入。

WriteText ( string filepath, string content, Encoding encoding, bool flush = false ) : void

对指定的文本日志文件写入一段文本

비공개 메소드들

메소드 설명
GetWriter ( string filepath, Encoding encoding ) : TextFileWriter
WriteText ( TextFileWriter stream, string content, Encoding encoding, bool flush ) : void

메소드 상세

Flush() 공개 정적인 메소드

刷新所有日志文本流,确保所有修改已经写入。
public static Flush ( ) : void
리턴 void

Flush() 공개 정적인 메소드

刷新指定日志文本流,确保所有修改已经写入。
public static Flush ( string filepath ) : void
filepath string
리턴 void

WriteText() 공개 정적인 메소드

对指定的文本日志文件写入一段文本
public static WriteText ( string filepath, string content, Encoding encoding, bool flush = false ) : void
filepath string 日志文件路径
content string 文本内容
encoding System.Text.Encoding 文本编码
flush bool 在写入后是否立即刷新日志流
리턴 void