Yandex.Cloud
  • Services
  • Why Yandex.Cloud
  • Pricing
  • Documentation
  • Contact us
Get started
Yandex Cloud Functions
  • Getting started
    • Overview
    • Creating and executing functions
    • Creating a timer
    • Creating a trigger for Yandex Message Queue
    • Creating a trigger for Object Storage
    • Creating a trigger for Container Registry
    • Creating a trigger for Cloud Logs
    • Creating a trigger for IoT Core
  • Step-by-step instructions
    • All instructions
    • Using functions to get an IAM token for a service account
    • Managing rights to access functions
    • Managing functions
      • Creating a function
      • Managing function versions
      • Working in the code editor
      • Invoking a function
      • Updating a function
      • Viewing monitoring charts
      • Viewing the execution log
      • Deleting a function
    • Managing triggers
      • Getting information about a trigger
      • Creating a timer
      • Creating a trigger for Message Queue
      • Creating a trigger for Object Storage
      • Creating a trigger for Container Registry
      • Creating a trigger for Cloud Logs
      • Creating a trigger for Yandex IoT Core
      • Updating a trigger
      • Deleting a trigger
  • Concepts
    • Overview
    • Functions
    • Invoking a function
    • Runtime environment
      • Overview
      • Environment
      • Execution context
    • Builder
    • Triggers
      • Overview
      • Timer
      • Trigger for Message Queue
      • Trigger for Object Storage
      • Trigger for Container Registry
      • Trigger for Cloud Logs
      • Trigger for Yandex IoT Core
    • Log groups
    • Monitoring
    • Backups
    • Quotas and limits
  • Developing in Node.js
    • Overview
    • Managing dependencies
    • Request handlers
    • Invocation context
    • Logging
    • Handling errors
    • Using the SDK
  • Developing in Python
    • Overview
    • Managing dependencies
    • Request handlers
    • Invocation context
    • Logging
    • Handling errors
    • Using the SDK
  • Developing in Go
    • Overview
    • Managing dependencies
    • Request handlers
    • Invocation context
    • Logging
    • Handling errors
    • Using the SDK
  • Developing in PHP
    • Overview
    • Managing dependencies
    • Request handlers
    • Invocation context
    • Logging
    • Handling errors
  • Developing in Bash
    • Overview
    • Request handlers
    • Logging
    • Handling errors
    • Using the SDK
  • Developing in Java
    • Overview
    • Java programming model
      • Overview
      • Using the Function interface to set a handler function
      • Using the YcFunction interface to set a handler function
      • Using the HttpServlet class to set a handler
      • Using the SpringBootApplication annotation to set a handler
    • Managing dependencies
    • Request handler
    • Invocation context
    • Logging
    • Handling errors
    • Using the SDK
  • Developing in R
    • Overview
    • R programming model
    • Building and managing dependencies
    • Request handler
    • context.md
    • Logging
    • Handling errors
  • Developing in C#
    • Overview
    • C# programming model
      • Overview
      • Using the Function interface to set a handler function
      • Using the YcFunction interface to set a handler function
    • Building and managing dependencies
    • Request handler
    • Invocation context
    • Logging
    • Handling errors
    • Using the SDK
  • Use cases
    • Creating skills for Alice
  • Pricing policy
  • Access management
  • API Functions reference
    • Authentication in the API
    • gRPC
      • Overview
      • FunctionService
      • OperationService
    • REST
      • Overview
      • Function
        • Overview
        • create
        • createVersion
        • delete
        • get
        • getVersion
        • getVersionByTag
        • list
        • listAccessBindings
        • listOperations
        • listRuntimes
        • listTagHistory
        • listVersions
        • removeTag
        • setAccessBindings
        • setTag
        • update
        • updateAccessBindings
  • API Triggers reference
    • Authentication in the API
    • gRPC
      • Overview
      • TriggerService
      • OperationService
    • REST
      • Overview
      • Trigger
        • Overview
        • create
        • delete
        • get
        • list
        • listOperations
        • pause
        • resume
        • update
  • Questions and answers
  1. Step-by-step instructions
  2. Managing functions
  3. Viewing the execution log

Viewing the execution log

    Function execution logs are stored for 14 days. The log uses Coordinated Universal Time, UTC.

    Management console
    CLI
    1. Select Cloud Functions in management console.
    2. Click the function you want to view the execution log for.
    3. In the window that opens, go to Logs and specify the time period. The default time period is 1 hour.

    When viewing the log, you can set a specific interval using the --since and --until flags. If no interval is specified when invoking a function, information for the last 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:

    • HH:MM:SS. Example: 15:04:05.

    • RFC-3339. Example: 2006-01-02T15:04:05Z, 2h, 3h30m ago.

    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 --folder-name or --folder-id parameter.

    To access a function, use its name or unique ID. To find them, get a list of functions in a folder.

    View the function execution log:

    $ yc serverless function logs <function name>
    

    Result:

    2019-07-04 09:27:43     START RequestID: 34dc9533-ed6e-4468-b9f2-2aa082266fad Version: b09i2s85a0c1fisjboft
    2019-07-04 09:27:43     END RequestID: 34dc9533-ed6e-4468-b9f2-2aa082266fad
    2019-07-04 09:27:43     REPORT RequestID: 34dc9533-ed6e-4468-b9f2-2aa082266fad 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-2e7f279394ef Version: b09i2s85a0c1fisjboft
    2019-07-04 09:29:26     END RequestID: 5b6a3779-dcc8-44ec-8ee2-2e7f279394ef
    2019-07-04 09:29:26     REPORT RequestID: 5b6a3779-dcc8-44ec-8ee2-2e7f279394ef Duration: 554.904 ms Billed Duration: 555.000 ms Memory Size: 128 MB Max Memory Used: 13 MB
    ...
    

    Note

    If you called a function with a specific tag, you must also specify this tag when viewing the execution log: yc serverless function logs my-python-function --tag test.

    Language
    Careers
    Privacy policy
    Terms of use
    © 2021 Yandex.Cloud LLC