Logs is transferred only from one app instance.
Closed this issue · 2 comments
Hi!
I try to use latest Serilog.Sinks.Seq nuget and I found strange behavior.
I run two instances of test console application (classic .Net Framework 4.5.2) and try to log data.
File system have new four files:
- log-20171010.log (contains data from both app instances)
- seq-buffer.bookmark
- seq-buffer-20171001.json (log file of first app instance)
- seq-buffer-20171001_001.json (log file of second app instance).
The seq-buffer.bookmark has reference only to one log file (seq-buffer-20171001.json).
The log data is transfered only from the first app instance to Seq, data from second app instance is transferred after closing of first app instance.
Looks like a bug!
AppConfig settings:
serilog:minimum-level =Info
serilog:write-to:Seq.bufferBaseFilename = seq-buffer
serilog:write-to:Seq.shared =true
...
serilog:write-to:RollingFile.pathFormat =log-{Date}.log
serilog:write-to:RollingFile.retainedFileCountLimit =1000
serilog:write-to:RollingFile.fileSizeLimitBytes
serilog:write-to:RollingFile.shared" value = true
Hi @appv - thanks for the report.
The "durable" logging mode doesn't support more than one process using the buffer file at a time, hence the behavior you see here.
I'd recommend using the non-durable mode if it is an option for you, or else setting up https://github.com/datalust/seq-forwarder on the machine otherwise.
Hope this helps, let me know if you need any more info.
nblumhardt, thanks for the clarification!