I'm working on a C# application that sends Logs on a remote Seq Sink by Serilog (Serilog.Sinks.Seq). It was working good until I added some more logs; After that it just sends some of the logs to seq. I tested File sink but it works without any problem and writes all logs to the file, but the seq is still have same problem. I even tested Seq on local computer, but no profit.
So I have installed Serilog.Sinks.PeriodicBatching hoping to solve the problem. but unfortunately I did not found any documentation or examples how to configure and enable it in my project. the only code I found is https://github.com/serilog/serilog-sinks-periodicbatching that I don't understand. anyone know how to use it to solve this problem with Seq? I need a simple example.
I'm using latest version of Serilog and PeriodicBatching.
Update 1:
Here is the File log that is produced correctly. In the seq the three last logs are dropped.
2021-02-06 09:45:36.164 +03:30 [INF] ⠀⠀⠀⠀⠀|
2021-02-06 09:45:36.180 +03:30 [INF] Application Start.
2021-02-06 09:45:36.180 +03:30 [ERR] It is a fresh OS
System.ArgumentNullException: Value cannot be null.
Parameter name: value
at Newtonsoft.Json.JsonConvert.DeserializeObject(String value, Type type, JsonSerializerSettings settings)
at Newtonsoft.Json.JsonConvert.DeserializeObject[T](String value, JsonSerializerSettings settings)
at SenderConsole.Program.scanClientAndSendIfDifferent() in D:\Programing\SysWatch\SenderConsole\Program.cs:line 434
2021-02-06 09:45:36.195 +03:30 [DBG] getCurrentClientConfig() Started.
2021-02-06 09:45:36.289 +03:30 [DBG] getCurrentClientConfig()==> CpuChanges
2021-02-06 09:45:36.305 +03:30 [DBG] getCurrentClientConfig()==> StorageChanges
2021-02-06 09:45:36.383 +03:30 [DBG] getCurrentClientConfig()==> RamChanges
2021-02-06 09:45:36.398 +03:30 [DBG] getCurrentClientConfig()==> MotherboardChanges
2021-02-06 09:45:36.414 +03:30 [DBG] getCurrentClientConfig()==> OsChanges
2021-02-06 09:45:36.492 +03:30 [DBG] getCurrentClientConfig()==> NicChanges
2021-02-06 09:45:36.679 +03:30 [DBG] getCurrentClientConfig()==> PrinterChanges
2021-02-06 09:45:36.695 +03:30 [DBG] getCurrentClientConfig()==> DomainChanges
2021-02-06 09:45:36.883 +03:30 [DBG] getCurrentClientConfig()==> iSMBIOSChanges
2021-02-06 09:45:36.914 +03:30 [DBG] getCurrentClientConfig()==> AppChanges
2021-02-06 09:45:36.929 +03:30 [DBG] getCurrentClientConfig()==> AntivirusChanges
2021-02-06 09:45:36.929 +03:30 [DBG] getCurrentClientConfig() Ended.
2021-02-06 09:45:36.929 +03:30 [DBG] configsAreDifferent() Started.
2021-02-06 09:45:36.929 +03:30 [INF] Configs are different.
2021-02-06 09:45:36.929 +03:30 [DBG] serializeByJson() Started.
2021-02-06 09:45:37.148 +03:30 [DBG] serializeByJson() Ended.
2021-02-06 09:45:39.210 +03:30 [FTL] Unable to connect to the remote server
2021-02-06 09:45:39.210 +03:30 [INF] Sent to DB.
2021-02-06 09:45:39.210 +03:30 [INF] Application End.
