[Yandex Cloud documentation](../../index.md) > [Yandex Serverless Containers](../index.md) > [Step-by-step guides](index.md) > Managing a container > Managing logs > Viewing logs

# Viewing container logs

All times in the log are [UTC](https://en.wikipedia.org/wiki/Coordinated_Universal_Time).

{% list tabs group=instructions %}

- Management console {#console}

    1. In the [management console](https://console.yandex.cloud), select the [folder](../../resource-manager/concepts/resources-hierarchy.md#folder) with your container.
    1. Navigate to **Serverless Containers**.
    1. Click the container to view its execution log.
    1. Navigate to the **Logs** tab and specify the period for which you want to view logs. The default period is one hour.
    
- CLI {#cli}
    
    If you do not have the Yandex Cloud CLI yet, [install and initialize it](../../cli/quickstart.md#install).
    
    The folder used by default is the one specified when [creating](../../cli/operations/profile/profile-create.md) the CLI profile. To change the default folder, use the `yc config set folder-id <folder_ID>` command. You can also specify a different folder for any command using `--folder-name` or `--folder-id`. If you access a resource by its name, the search will be limited to the default folder. If you access a resource by its ID, the search will be global, i.e., through all folders based on access permissions. 

    When viewing the log, you can set a specific time interval using the `--since` and `--until` flags. If you do not specify a time interval, the log will show info for the last hour.
    
    Using flags:
    
    - `--since`: Time N and later.
    
    - `--until`: Time N and earlier.
    
    If you only specify a single flag, you will see info for one hour before or after time N, depending on the flag.
    
    You can use one of these time formats:
    
    - `HH:MM:SS`, e.g., `15:04:05`.
    
    - [RFC-3339](https://www.ietf.org/rfc/rfc3339.txt), e.g., `2006-01-02T15:04:05Z`, `2h`, or `3h30m ago`.
   
    To access a container, use its name or ID. To get them, [get a list of containers](list.md) in the folder.

    View the container execution log:

    ```bash
    yc logging read --resource-ids=<container_ID>
    ```
    Result:
    ```text
	2021-12-07 10:39:03  INFO START RequestID: 24ad08bd-10f7-4e76-9f08-b2b1********
	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-b2b1********
    ```

{% endlist %}

To learn more about working with logs, see [this Yandex Cloud Logging article](../../logging/index.md).