-
Notifications
You must be signed in to change notification settings - Fork 30
Sink not working #39
Comments
Have the same issue, buffer file contains messages but nothing goes to Loggly. I'm on .NET Core 2.1 |
Hi there, We are having the same issue. Any ideas? |
Hi. Sorry for being so late to respond on this. Can you try to activate the Serilog's SelfLog to see if any erro rinfo from within Serilog appears? https://github.com/serilog/serilog/wiki/Debugging-and-Diagnostics |
Having the same issue. Simply not working. Waste of time. |
hi @nicholasyin . Have you tried activating Serilog's selflog functionality to see if any error is being generated? |
Thanks, but no, i simply quit using loggly. |
I don't know that this will be particularly helpful, but we were successfully using this sink for years, then upgraded to dotnet core 2.1 and it suddenly stopped working (other serilog sinks continued to work without a problem). Reverting back to 2.0 fixed the issue, but we are still looking into this as we want to move to 2.1. I tried using SelfLog but wasn't able to get it to write to a file. Writing to the console, I occasionally saw this message: "Received failed HTTP shipping result Unknown:". One of our developers noted that dotnet changed their sockets api in 2.1; perhaps that could be part of the problem? (https://docs.microsoft.com/en-us/dotnet/core/whats-new/dotnet-core-2-1#sockets-improvements) |
Thanks @chrissychimi . The package that is generated targets netstandard 1.5 so it should be compatible, but maybe the ´System.Net.Http´ ref could be a problem (or a problem in the If you or your team gets a chance, could you check to see it the problem persists in the I haven't upgraded any of our apps that use this to 2.1, so I haven't seen that behaviour yet, but my team has been using the dev package for about a month without any visible problems. |
Hi @MiguelAlho I tried using I got the following code to work by using the same NuGet package versions as the
Any other ideas? |
This is the configuration as configured via
|
I am trying to debug the sink code myself, but it's not stopping in the breakpoints I set in |
@chriswolf-nrg I ran a few tests with the sample app (as-is) with my token and I can see the messages in Loggly's Live Tail feature appearing. I had to use the app token (I have one i use for non-prod apps) since the one supplied in the Live Tail Tokens tab did not work. The messages did appear, though with some significant delay in the live tail page. I tested for
I noticed in the configuration snippet above that you added two ApplicaitonNameTag tags. is that possible in Loggly? (I have only used one and never tried two of that type). The config via AppSettings i believe is recent. There initially were some issues with configuring sinks that required a deeper config tree; That might be something worth looking into (either by flattening the options or some other approach). |
Hi @MiguelAlho - thanks for testing it out. When I test, I use http://www.charlesproxy.com so when it captures out going REST messages, then I know the Loggly Sink is working, regardless of the delay. Unfortunately, I think the config via
In the above example, trying to set the theme on the Console Sink doesn't work - I get a cast exception; the Loggly sink doesn't throw an exception, but it never sends anything to Loggly. |
@MiguelAlho to answer your question about the code snippet setting tags:
Here's what the output looks like: Again, this is with the programmatic configuration - the |
Any activity on this? Not being able to use app settings to configure the sink is kind of a deal breaker. |
The Loggly-Csharp library seems to have gotten an update / fix related to NetStandard 1.5. : neutmute/loggly-csharp@7eb51d2: Would this help in any way? This issue is obviously old, and maybe no longer relevant, but still worth adding the note here. |
The features/jsonConfig branch contains a new, sample project to validate and test out appsetting.json based configurations. Only tested for NetCore 3.1, for now. @chriswolf-nrg I based the configuraton in the sample off of yours. Do note that your |
Just tried this sink with a working Loggly account but seems not working at all.
This is my configuration code:
After launch above method I create my log like this:
new LoggerConfiguration().Enrich.With(new UserLogEventEnricher(userName, $"v. {appVersionString} b{appBuildNumber}")).WriteTo.Loggly(bufferBaseFilename: @"log_buffer").CreateLogger();
But when I log something nothing appears on website side. Worst problem is that there are no error or exception at all. I tried to place a wrong token or a wrong connection port (433888888 is a little bit large number for a port) but I get no error, it does nothing at all.
What am I missing?
Edit:
Checked on app folder (in simulator) I can see the
log_buffer
file is created and filled with logs so the problem seems only the connection with Loggly server.The text was updated successfully, but these errors were encountered: