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

# Viewing function 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), navigate to the folder containing the function.
    1. Navigate to **Cloud Functions**.
    1. Click the function to view its execution log.
    1. In the window that opens, go to **Logs** and specify the period for which you want to view logs. The default period is one hour.
    
- CLI {#cli}
    
    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`.
    
    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. 
   
    To find out the name or ID of a function, [get](function-list.md) the list of functions in the folder.

    View the function execution log:

    ```bash
    yc serverless function logs <function_name>
    ```
    Result:
    ```text
    2019-07-04 09:27:43     START RequestID: 34dc9533-ed6e-4468-b9f2-2aa0******** Version: b09i2s85a0c1********
    2019-07-04 09:27:43     END RequestID: 34dc9533-ed6e-4468-b9f2-2aa0********
    2019-07-04 09:27:43     REPORT RequestID: 34dc9533-ed6e-4468-b9f2-2aa0******** Duration: 538.610 ms Billed Duration: 538.700 ms Memory Size: 128 MB Max Memory Used: 13 MB
    2019-07-04 09:29:25     START RequestID: 5b6a3779-dcc8-44ec-8ee2-2e7f******** Version: b09i2s85a0c1********
    2019-07-04 09:29:26     END RequestID: 5b6a3779-dcc8-44ec-8ee2-2e7f********
    2019-07-04 09:29:26     REPORT RequestID: 5b6a3779-dcc8-44ec-8ee2-2e7f******** Duration: 554.904 ms Billed Duration: 555.000 ms Memory Size: 128 MB Max Memory Used: 13 MB
    ...
    ```

    {% note info %}
    
    If you called a function with a specific tag, make sure to specify this tag when viewing the execution log: `yc serverless function logs my-python-function --tag test`.
    
    {% endnote %}


{% endlist %}

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