File tree Expand file tree Collapse file tree 3 files changed +4
-8
lines changed
src/Serilog.Sinks.File/Sinks/File
test/Serilog.Sinks.File.Tests Expand file tree Collapse file tree 3 files changed +4
-8
lines changed Original file line number Diff line number Diff line change @@ -60,7 +60,7 @@ public override long Position
6060
6161 public override long Seek ( long offset , SeekOrigin origin )
6262 {
63- return _stream . Seek ( offset , origin ) ;
63+ throw new InvalidOperationException ( $ "Seek operations are not available through ` { nameof ( WriteCountingStream ) } `." ) ;
6464 }
6565
6666 public override void SetLength ( long value )
Original file line number Diff line number Diff line change @@ -143,12 +143,12 @@ public void WhenLimitIsNotSpecifiedAndEncodingHasNoPreambleDataIsCorrectlyAppend
143143 WriteTwoEventsAndCheckOutputFileLength ( maxBytes , encoding ) ;
144144 }
145145
146- private static void WriteTwoEventsAndCheckOutputFileLength ( long ? maxBytes , Encoding encoding )
146+ static void WriteTwoEventsAndCheckOutputFileLength ( long ? maxBytes , Encoding encoding )
147147 {
148148 using ( var tmp = TempFolder . ForCaller ( ) )
149149 {
150150 var path = tmp . AllocateFilename ( "txt" ) ;
151- var evt = Some . LogEvent ( "Irelevant as it will be replaced by the formatter " ) ;
151+ var evt = Some . LogEvent ( "Irrelevant as it will be replaced by the formatter" ) ;
152152 var actualEventOutput = "x" ;
153153 var formatter = new FixedOutputFormatter ( actualEventOutput ) ;
154154 var eventOuputLength = encoding . GetByteCount ( actualEventOutput ) ;
Original file line number Diff line number Diff line change 11using Serilog . Formatting ;
2- using System ;
3- using System . Collections . Generic ;
4- using System . Linq ;
5- using System . Threading . Tasks ;
62using Serilog . Events ;
73using System . IO ;
84
9- namespace Serilog . Tests
5+ namespace Serilog . Tests . Support
106{
117 public class FixedOutputFormatter : ITextFormatter
128 {
You can’t perform that action at this time.
0 commit comments