-
Notifications
You must be signed in to change notification settings - Fork 50
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Serilog server does not receive any data on 5.2.2 by .NET #194
Comments
Thanks for the note! Do you see any output in Serilog's SelfLog? |
No output in selflog, yet I use WriteTo.Debug and Write.ToFile as well. I do see a text in the Output window of visual studio (cause by WriteTo.Debug), Also the test.txt stays empty, Log.CloseAndFlush() do not affect this result. I revert back to 5.1.1 and test.txt stays empty, yet the logging to SEQ works again. |
We've run into the same issue. Downgrading to 5.1.1 fixes it, but so does setting We use this sink with The |
"Perhaps its implementation is giving issues on specific targets?" Is this a general question for a future update or is your reaction insinuating I should use a different implementation of the HttpHandler? |
It's a general question, specifically for the maintainers of this sink. I'm saying using There are known benefits when using What's confusing to me is that |
"Does specifying HttpClientHandler in the .WriteTo.Seq(...) call as the messageHandler fix the issue for you as well while using version 5.2.2?" Could you give me a more clear coding example what to write exactly? My knowledge about the HttpClientHandler and the rest of the topic is way to limited. Thnx |
In your screenshot above you used |
Aha. I switched back to 5.2.2, I made sure the logging still worked at 5.1.1 just before that. With 5.2.2 it did not work, adding the new HttpClientHandler() didn't fix it unfortunately... |
@bddckr thanks for the note regarding the Android compatibility issue! Sounds like a very challenging set of platforms to support - hopefully the workaround you have now will hold up until the underlying issue is found and resolved. @MiiChielHD my guess is that the changed message handler is interfering with something like default internet proxy settings being picked up; .WriteTo.Seq("some URL", apiKey: "some API key", messageHandler: new WinHttpHandler()) Let me know if this helps! Nick |
Hey Nick, Nope this doesn't work either. Again I tried 5.1.1 first to test if the it logs and yes it did. Then tried 5.2.2 with WinHttpHandler... no success. Note that with WinHttpHandler with 5.1.1 also does not work. Without WinHttpHandler it works with 5.2.0 as well, it breaks at 5.2.1; Earlier on I went back to 5.1.1 as a good guess that it would work at least. It did yet I did not try a higher version before 5.2.2. Anyway its a change in 5.2.1 that breaks it. |
Interesting! Thanks for the follow-up. The only change in 5.2.1 is an update to the Serilog.Sinks.PeriodicBatching dependency: https://github.com/datalust/serilog-sinks-seq/pull/186/files Is your project using version 3.1.0 of that package? Do you have some success if you add: <PackageReference Include="Serilog.Sinks.PeriodicBatching" Version="3.1.0" /> to your top-level project's (e.g. executable's) CSPROJ file? |
Unfortunately with 5.2.1 and PeriodicBatching 3.1.0 it doesn't work either... Back to 5.2.0 with PeriodicBatching 3.1.0 it doesn't work either. Without PeriodicBatching it works again on 5.2.0 |
Thanks again @MiiChielHD - we'll dig in further here, and let you know what we find. (The next few weeks the team will be on vacation at different times, so it may take a while to reach some conclusions.) |
@nblumhardt No problem, hope you will find the problem in the future. |
I'm back again, same problem, I tried using AuditTo.Seq(http://adress:port", apikey:"key") This time I'm using .net Framework 4.5.2 The error i get is: Or in english, not access to deleted object, objectname: System.Net.Http.HttpClient I also tried using messageHandler: new HttpClientHandler(), no luck; Is there a possibility that the problem is that our server is not https but http? |
Hi @MiiChielHD, thanks for looping back. I can finally see the problem! In your screenshot above - you're constructing your logger in a using (var log = ...)
{
Log.Logger = log;
}
// More code here At the end of the Some sinks don't perform any tear-down on dispose - Getting rid of the HTH, |
@nblumhardt Aah! That solves it... Great catch! Thank you, the newest version of Serilog.Sinks.Seq also works on .Net framework 4.5.2; I think you can close the topic now :). |
Hi,
With WPF applications I used 5.1.1 , which still send loggings fine to our local instance of SEQ Server. Yet when using 5.2.2 (WPF NET 6.0) it doesn't receive anything. I tried to create a new project with WPF .NET Framework 4.8, still not working. I reverted back to 5.1.1 and it now works.
I have a ASP.NET Core 6 console application running on ubuntu, with Serilog SEQ 5.2.2 and those loggings are being received by our instance of SEQ Server perfectly.
Our instance of SEQ Server runs 2022.1.7929
Is this a problem on our side?
The text was updated successfully, but these errors were encountered: