I have a Flask server running on GCE's container-optimized image. This server prints a log for every request. Normally, I can view the logs my application prints in GCP Stackdriver Logging console with no problem at all.
As of a few days ago, I could no longer see any logs from the VM in the Logging console. I have not touched the VM for the last 2 weeks: no code deployment, no restart, nothing of the sort. The server is clearly still running, since it continues to respond to requests as you would expect.
To be clear, I can see logs like "Compute Engine reset", but I can see none of the logs generated by my application's code.
First, I reset the VM instance using the GCE console. Did not work.
Second, I stopped the VM instance, then started it again. Did not work.
Third, I SSHd into my VM instance, and ran
logger "Test logs!". I could still see nothing in the Logging Console.
Fourth, I made sure I had no filters in the logging console.
Fifth, I checked logs for other VM instances. No problems there. Only this one specific VM is facing this issue.
My hunch is that something happened to the logging agent on this VM. But I have no idea how to resolve that :(
Any help would be much appreciated!