0

I'm trying to use the Google.cloud.logging.log4net library in a .NET Web application to send logs to Google Stackdriver. I've followed the steps from stackdriver logging how to guide Option 2 https://cloud.google.com/logging/docs/integrate/dotnet It seems to work from my local machine when I provide the service account credentials. But it does not send logs when I run it from a GCE instance.

  • Can you make a manual call from the VM instance? If you cannot, can you provide the error message that you receive when making the manual call? – Jason Nov 22 '18 at 16:42
  • I am able to log using the command line and also using the Google.cloud.logging.v2 library( using GetApplicationDefault credentials) but logs are not sent when I use log4net. – Shubham Soni Nov 22 '18 at 20:40
  • At this point, I would suggest creating a public issue tracker here "https://issuetracker.google.com". Since you can make calls to the logs manually, but cannot do it following the steps from our public documentation on a VM instance, this can maybe point to an internal issue with GCE. – Jason Nov 26 '18 at 16:50
  • Added the issue: https://issuetracker.google.com/u/1/issues/120162347 – Shubham Soni Nov 29 '18 at 09:40
  • Can you suggest possible internal issues that could be there with the GCE, since the logging.V2 works perfectly? – Shubham Soni Nov 29 '18 at 09:42
  • Update: So I tried running the sample logging app provided in https://github.com/GoogleCloudPlatform/dotnet-docs-samples/tree/master/logging/api/Log4Net, and the sample app is working fine from the gce instance but the verison of logging.log4net library used is 1.0.0-beta5 as mentioned in th packages.conf( ) – Shubham Soni Nov 30 '18 at 11:42
  • When I update the nuget package to the latest version, the app doesn't works. What are the changes needed to be made in the code so that the latest version of the library works? – Shubham Soni Dec 03 '18 at 13:32

0 Answers0