google-container-os

Container-Optimized OS syslog location?


Where is Container-Optimized OS’s syslog file located? I’m looking for something like /var/log/syslog. One reason I need this is to troubleshoot ssh login failures.


Solution

  • Where is Container-Optimized OS’s syslog file located?

    The logfiles for Container OS are not stored on the operating system. Instead, the logs are sent to Stackdriver. Containers are designed to be destroyed and recreated. Storing logfiles on the container would mean loosing them.

    To view the logs that do exist temporarily, as in the latest logs, you can use the program journalctl to view them.

    Here is a link to an article that introduces journalctl and how to use the basic features:

    Use journalctl to View Your System's Logs