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 a1c257d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 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 @@ -437,7 +436,8 @@ public LineEndingMode LineEnding
/// </summary>
/// <docgen category='Performance Tuning Options' order='10' />
[DefaultValue(32768)]
public int BufferSize { get; set; }
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 a1c257d

Please sign in to comment.