Yandex Cloud
  • Services
  • Solutions
  • Why Yandex Cloud
  • Blog
  • Pricing
  • Documentation
  • Contact us
Get started
Language / Region
Yandex project
© 2023 Yandex.Cloud LLC
Yandex Cloud Functions
  • Comparison with other Yandex Cloud services
  • Getting started
  • Step-by-step instructions
  • Concepts
    • Overview
    • Function
    • Invoking a function
    • Networking
    • Runtime environment
    • Builder
    • Trigger
    • Dead Letter Queue
    • Function logs
    • Backups
    • Quotas and limits
  • Developing in Node.js
  • Developing in Python
  • Developing in Go
  • Developing in PHP
  • Developing in Bash
  • Developing in Java
  • Developing in R
  • Developing in C#
  • Practical guidelines
  • Pricing policy
  • Access management
  • API Functions reference
  • API Triggers reference
  • Questions and answers
  1. Concepts
  2. Function logs

Function logs

Written by
Yandex Cloud
  • Structured logs
  • See also

A function writes logs to Yandex Cloud Logging, to the default log group for the folder where the function is located.

There are two types of logs:

  • Automatic: Logs of requests to functions.
  • Custom: Logs that custom code writes to the standard output (stdout) and standard error output (stderr).

Learn more about working with logs in the Yandex Cloud Logging documentation.

Structured logs

Apart from text, structured logs in the following JSON format can be written to the stdout and stderr standard output streams:

  • message/msg: Entry text.
  • level: Logging level. Possible logging levels: TRACE, DEBUG, INFO, WARN, ERROR, and FATAL.

All the fields, except message/msg and level, are automatically logged to json-payload.

A log must be single-line. Any entry that contains the message/msg field and is up to 64 KB is considered to be a structured log. If the entry size is larger, it's split into multiple records and treated as text.

You can disable structured logs by setting the environment variable STRUCTURED_LOGGING = false. In this case, any JSON log is considered to be plain text.

See also

  • Writing information to the execution log. Function examples.

Was the article helpful?

Language / Region
Yandex project
© 2023 Yandex.Cloud LLC
In this article:
  • Structured logs
  • See also