4
  • I created a DotNet Core App
  • Deployed it on the Google App Engine (Custom / Flex)
  • I opened the logging tab

I noticed the following entry: _ah/vm_health
It is not there once or twice, it is there very large number of times

Questions:

  1. How can I exclude this one from the logs, I know the system is checking if everything is healthy, and this is good, I just don’t want it logged.
  2. How can I exclude anything from the logs? For example, there is an entry, and it is sending things to the logs, and wanted ignored by the log system.
Dan Cornilescu
  • 39,470
  • 12
  • 57
  • 97

1 Answers1

4

You can't disable logging of the health checks: they're still requests hitting your app and they're logged like any other request.

In the StackDriver Logs Viewer you might be able to use the Advanced Logs Filters to filter out and prevent displaying of the undesired logs. I can't give an actual example, though, as I didn't yet use this facility. Just to be clear - this just prevents displaying the logs when the filter is applied, the logs are not ignored by the logging system.

Dan Cornilescu
  • 39,470
  • 12
  • 57
  • 97
  • But if I can't disable some items to be logged, or I can't control the auto delete of some logs, I will end-up with very large number of logged items that I do not want. – George West Mar 19 '17 at 16:22
  • Not much you can do about that with regular logging. But if you use sinks for further log export/processing you could do some filtering there. See https://cloud.google.com/logging/docs/export/using_exported_logs. – Dan Cornilescu Mar 19 '17 at 19:15
  • Yes, sinks should do the trick, see here as well: https://stackoverflow.com/questions/68607220/google-app-engine-disable-request-logging/72895859#72895859 – nikelone Jul 07 '22 at 10:03