Skip to content

Commit

Permalink
增补注释
Browse files Browse the repository at this point in the history
  • Loading branch information
Ivony committed May 8, 2014
1 parent 01cfa78 commit 40ad0e6
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions Ivony.Logs/TextFileLogger.cs
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,12 @@ private TextFileLogger( ILogFilter filter, Encoding encoding )
basePath = AppDomain.CurrentDomain.SetupInformation.ApplicationBase;
}

/// <summary>
/// 创建文本文件日志记录器
/// </summary>
/// <param name="filenameProvider">文件名提供程序</param>
/// <param name="filter">日志筛选器</param>
/// <param name="encoding">文件编码</param>
public TextFileLogger( LogFilenameProvider filenameProvider, ILogFilter filter = null, Encoding encoding = null )
: this( filter, encoding )
{
Expand All @@ -36,6 +42,16 @@ public TextFileLogger( LogFilenameProvider filenameProvider, ILogFilter filter =

}

/// <summary>
/// 创建文本文件日志记录器
/// </summary>
/// <param name="logDirectory">存放日志文件的目录</param>
/// <param name="filter">日志筛选器</param>
/// <param name="cycle">日志文件记录周期</param>
/// <param name="prefix">文件名前缀</param>
/// <param name="postfix">文件名后缀</param>
/// <param name="extension">文件扩展名</param>
/// <param name="encoding">文件编码</param>
public TextFileLogger( DirectoryInfo logDirectory, ILogFilter filter = null, LogFilenameProvider cycle = null, string prefix = "", string postfix = "", string extension = ".log", Encoding encoding = null )
: this( filter, encoding )
{
Expand All @@ -52,6 +68,11 @@ public TextFileLogger( DirectoryInfo logDirectory, ILogFilter filter = null, Log



/// <summary>
/// 获取日志文件路径
/// </summary>
/// <param name="entry">要记录的日志条目</param>
/// <returns>日志文件路径</returns>
protected override string GetFilepath( LogEntry entry )
{
var path = _filenameProvider.GetName( entry );
Expand Down

0 comments on commit 40ad0e6

Please sign in to comment.