Skip to content

Commit

Permalink
FileTarget - RetryingMultiProcessFileAppender should only use BufferS…
Browse files Browse the repository at this point in the history
…ize=1024
  • Loading branch information
snakefoot committed Dec 18, 2016
1 parent fa1eb2d commit 66fea7d
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/NLog/Targets/FileTarget.cs
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,6 @@ public FileTarget()
#else
this.Encoding = Encoding.Default;
#endif
this.BufferSize = 32768;
this.AutoFlush = true;
#if !SILVERLIGHT
this.FileAttributes = Win32FileAttributes.Normal;
Expand Down Expand Up @@ -436,8 +435,13 @@ public LineEndingMode LineEnding
/// Gets or sets the log file buffer size in bytes.
/// </summary>
/// <docgen category='Performance Tuning Options' order='10' />
#if NET3_5
[DefaultValue(1024)]
#else
[DefaultValue(32768)]
public int BufferSize { get; set; }
#endif
public int BufferSize { get { return bufferSize ?? (KeepFileOpen && !NetworkWrites ? 32768 : 1024); } set { bufferSize = value; } }
private int? bufferSize;

/// <summary>
/// Gets or sets the file encoding.
Expand Down

0 comments on commit 66fea7d

Please sign in to comment.