File tree 3 files changed +4
-8
lines changed
src/Serilog.Sinks.File/Sinks/File
test/Serilog.Sinks.File.Tests
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
60
60
61
61
public override long Seek ( long offset , SeekOrigin origin )
62
62
{
63
- return _stream . Seek ( offset , origin ) ;
63
+ throw new InvalidOperationException ( $ "Seek operations are not available through ` { nameof ( WriteCountingStream ) } `." ) ;
64
64
}
65
65
66
66
public override void SetLength ( long value )
Original file line number Diff line number Diff line change @@ -143,12 +143,12 @@ public void WhenLimitIsNotSpecifiedAndEncodingHasNoPreambleDataIsCorrectlyAppend
143
143
WriteTwoEventsAndCheckOutputFileLength ( maxBytes , encoding ) ;
144
144
}
145
145
146
- private static void WriteTwoEventsAndCheckOutputFileLength ( long ? maxBytes , Encoding encoding )
146
+ static void WriteTwoEventsAndCheckOutputFileLength ( long ? maxBytes , Encoding encoding )
147
147
{
148
148
using ( var tmp = TempFolder . ForCaller ( ) )
149
149
{
150
150
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" ) ;
152
152
var actualEventOutput = "x" ;
153
153
var formatter = new FixedOutputFormatter ( actualEventOutput ) ;
154
154
var eventOuputLength = encoding . GetByteCount ( actualEventOutput ) ;
Original file line number Diff line number Diff line change 1
1
using Serilog . Formatting ;
2
- using System ;
3
- using System . Collections . Generic ;
4
- using System . Linq ;
5
- using System . Threading . Tasks ;
6
2
using Serilog . Events ;
7
3
using System . IO ;
8
4
9
- namespace Serilog . Tests
5
+ namespace Serilog . Tests . Support
10
6
{
11
7
public class FixedOutputFormatter : ITextFormatter
12
8
{
You can’t perform that action at this time.
0 commit comments