Skip to content

Commit

Permalink
PR code review items from #23
Browse files Browse the repository at this point in the history
  • Loading branch information
nblumhardt committed Nov 14, 2016
1 parent 5336190 commit 1b029c8
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 8 deletions.
2 changes: 1 addition & 1 deletion src/Serilog.Sinks.File/Sinks/File/WriteCountingStream.cs
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ public override long Position

public override long Seek(long offset, SeekOrigin origin)
{
return _stream.Seek(offset, origin);
throw new InvalidOperationException($"Seek operations are not available through `{nameof(WriteCountingStream)}`.");
}

public override void SetLength(long value)
Expand Down
4 changes: 2 additions & 2 deletions test/Serilog.Sinks.File.Tests/FileSinkTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -143,12 +143,12 @@ public void WhenLimitIsNotSpecifiedAndEncodingHasNoPreambleDataIsCorrectlyAppend
WriteTwoEventsAndCheckOutputFileLength(maxBytes, encoding);
}

private static void WriteTwoEventsAndCheckOutputFileLength(long? maxBytes, Encoding encoding)
static void WriteTwoEventsAndCheckOutputFileLength(long? maxBytes, Encoding encoding)
{
using (var tmp = TempFolder.ForCaller())
{
var path = tmp.AllocateFilename("txt");
var evt = Some.LogEvent("Irelevant as it will be replaced by the formatter ");
var evt = Some.LogEvent("Irrelevant as it will be replaced by the formatter");
var actualEventOutput = "x";
var formatter = new FixedOutputFormatter(actualEventOutput);
var eventOuputLength = encoding.GetByteCount(actualEventOutput);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,8 @@
using Serilog.Formatting;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Serilog.Events;
using System.IO;

namespace Serilog.Tests
namespace Serilog.Tests.Support
{
public class FixedOutputFormatter : ITextFormatter
{
Expand Down

0 comments on commit 1b029c8

Please sign in to comment.