5

I'm reading Google's docs on logging in managed VMs, and they're rather thin on detail, and I have more questions than answers after reading:

  • Files in /var/log/app_engine/custom_logs are picked up automatically it says – is this path pre-existing or do you also have to mkdir -p it?
  • Do I have to deal with log rotation/truncation myself?
  • How large can the files be?
  • If you write a file ending in .log.json and some bit of it is corrupt, does that break the whole file or will Google pick up the bits that can be read?
  • Is there a performance benefit/cost to log things this way, over using APIs?

UPDATE: I managed to have logs show up in the log viewer, but only when logging files with the .log suffix, whenever I try .log.json they are not being picked up and I can't see any errors anywhere. The JSON output seems fine, and conforms to the requirement of having one object per line. Does anyone know how to debug this?

Mycoola
  • 1,135
  • 1
  • 8
  • 29
Marcus Stade
  • 4,724
  • 3
  • 33
  • 54
  • 1
    So I've gone ahead with the #yolo approach, simply redirecting output to two files under `/var/log/app_engine/custom_logs`. Now, despite using this path, the logs actually end up under `/var/log/app_engine/app/custom_logs`, which I verified by SSHing into the instance and looking around. These logs show up nowhere in the Log Viewer. – Marcus Stade Feb 17 '15 at 16:46

0 Answers0