I am working on an Web Api in .net. I am writing logs using Serilog and Seq. I made the configuration following the Seq official web site. Basically placing this code in my startup.cs file:
var logger = new LoggerConfiguration()
.MinimumLevel.Debug()
.WriteTo.Seq("http://localhost:5431/")
.CreateLogger();
builder.RegisterInstance<Serilog.ILogger>(logger);
I am logging to localhost so I am able to see my logs locally. So far so good.
I deployed my Api to azure and I want to continue logging on the same way. So I worked with the link https://docs.getseq.net/v3/docs/azure-installation and made the configuration. I had to create a virtual machine different from my ServicePlan and my Api. I installed Seq on that VM and run the Seq program on the url http://example.azurewebsites.net:5341/ so I made the change in my startup file too.
.WriteTo.Seq("http://example.azurewebsites.net:5341/")
I also had to create a Firewall Rule in the port 5341 in my VM and an Inbound Rule in the VM Network Security Rule.
I deployed again, at this point I would expect yo have Seq running on http://example.azurewebsites.net:5341/, but that is not certainly happening because I cannot find anything at the url neither from my PC browser nor from VM browser.
What am I missing? or In which configuration steps I have to check again?