-
Notifications
You must be signed in to change notification settings - Fork 246
Azure Streaming Log with Trace #218
Comments
Any help on this issue? I am unable to get log output to show in the Azure web app log stream. |
+1 on this. I can't get this to work either. I don't think it was working before beta8, but now that beta8 requires Kestrel, that might complicate the issue even more. It would be nice to get an official statement, even if the statement happens to be "we won't be supporting this anytime soon" |
@kichalla Did you recently do an investigation similar to this? |
@muratg No. For the packagesearch website I used Serilog framework + Azure DocumentDb |
@Eilon I remember you were discussing this (logging in Azure) in another issue somewhere, but I can't seem to find it. What was the outcome? |
Sorry I don't recall. |
@davidfowl @lodejard What are your thoughts on this? Should we recommend people to use something like Serilog or should we have an implementation that does this? |
Would be really great to support Azure streaming logs automatically. Can we talk to an Azure person to see what we have to do to be compatible? Does it just listen to some particular output, e.g. console? Or something? |
I'll ping @davidebbo |
I have an experimental project that should make that work today: https://github.com/davidebbo-test/ConsoleInterceptor. Give it a try and see how it fares. |
I got the consoleinterceptor to stream logs without any trouble, but I couldn't get them to upload to Blob storage by enabling Application Logging (blob) on the Azure web site. I'm not sure how the Application Log (blob) works for classic ASP.NET apps. Perhaps a classic ASP.NET app drops the log files in a different path than the console interceptor? It's probably user error on my part - I didn't try too hard to get it to work yet |
Blob/Table storage is not supported at this point. For class .NET, it works via a registered trace listener, but that concept doesn't exist in ASP.NET 5 afaik. It's something we'll need to solve. |
Is this still an issue? I'm running ASP.NET Core 1.0 RC1, and I have tried Am I doing something wrong, or is this still being worked on? Not being able to trace out an issue when deployed to Azure is frustrating. 😕 |
There was a problem where HttpPlatformHandler would not flush the logs to the stream frequently: aspnet/IISIntegration#57 We have a fix prepared for that, but we still need to get it deployed to azure and verify it. |
Hey, @davidebbo just announced "You can now git deploy http://ASP.NET Core RC2 projects to your Azure Web Apps. #aspnetcore #azure #kudu" in https://twitter.com/davidebbo/status/733040676879929344. Is this bug still opened or do we still have to proxy the logs through |
This should be working now. If there are still issues, please file another bug. |
@muratg what's the best way to test this? Specific, what does tracing code look like in RC2? I don't think it's |
An example of how you can set it up: https://github.com/aspnet/Logging/blob/dev/test/Microsoft.Extensions.Logging.Test/TraceSourceLoggerTest.cs#L16-L23 and then its the usual |
I'm not seeing any log file getting created at all. My web.config has this:
What am I missing? |
cc @moozzyk |
@davidebbo - has the application started successfully? Do you see any entries from AspNetCoreModule in the (counterpart of) eventlog? Can you share your application so that I can try it? |
@moozzyk Try https://github.com/davidebbo-test/AspNetCoreRC2VS. Just git deploy it to an Azure Web App, and then edit the web.config as above. Yes, it runs fine. It just doesn't seem to create an logs at all. |
And yes, there is a startup message from core module:
|
@moozzyk I see, the problem is that you gave the wrong info here :)
|
@davidebbo - crap - I copied it directly from the code but it was from the code where we come up with the folder and then we append the file name to it. Apologies! |
No problem, it's good that it works! We should think about making this easier for Azure users, though, so they don't have to manually change I'll start another issue. |
You don't need to - one already exists: aspnet/IISIntegration#167 |
As a workaround - you can just remove the |
Too late, I opened #429 |
@moozzyk in that case, we should change the VS template to do this. I just have whatever it generated, and so will most users. |
This is one of the option we discussed but it was too late to rush anything for RC2 without risking regretting it later. |
Hello,
"System.Diagnostics.Trace.TraceInformation("Test Trace);" only write in the debug output window.
This should not write in the IIS logs? This should also work with Azure Streaming Log?
The text was updated successfully, but these errors were encountered: