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 tomkdir -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?