Viewing container logs
Container runtime logs are stored for 14 days. The log uses UTC time.
- In the management console, select Serverless Containers.
- Click on a container to view its runtime log.
- Go to the Logs tab and specify the period for which you wish to view logs. The default time period is 1 hour.
If you don't have the Yandex Cloud command line interface yet, install and initialize it.
The folder specified in the CLI profile is used by default. You can specify a different folder using the
When viewing the log, you can set a specific interval using the
--until flags. If no time interval is specified, information for the previous hour is displayed.
The following flags are used:
--since: Time N and later.
--until: Time N and earlier.
If you only specify one flag, information is displayed for the hour before or after N depending on the flag.
Allowed time formats:
To access a container, use its name or unique ID. To get them, get a list of containers in the folder.
View the container runtime log:
yc logging read --resource-ids=<container_ID>
2021-12-07 10:39:03 INFO START RequestID: 24ad08bd-10f7-4e76-9f08-b2b14b04495b 2021-12-07 10:39:03 Hi, I'm inside 2021-12-07 10:39:03 runtime pid 76: exited with 0 ... 2021-12-07 10:42:04 INFO END RequestID: 24ad08bd-10f7-4e76-9f08-b2b14b04495b
Learn more about working with logs in the Yandex Cloud Logging documentation.