Yandex Cloud
Search
Contact UsGet started
  • Blog
  • Pricing
  • Documentation
  • All Services
  • System Status
    • Featured
    • Infrastructure & Network
    • Data Platform
    • Containers
    • Developer tools
    • Serverless
    • Security
    • Monitoring & Resources
    • ML & AI
    • Business tools
  • All Solutions
    • By industry
    • By use case
    • Economics and Pricing
    • Security
    • Technical Support
    • Customer Stories
    • Gateway to Russia
    • Cloud for Startups
    • Education and Science
  • Blog
  • Pricing
  • Documentation
Yandex project
© 2025 Yandex.Cloud LLC
Yandex Cloud Logging
  • Getting started
    • All guides
    • Adding records
    • Reading records
    • Managing rights to access log groups
  • Access management
  • Pricing policy
  • Terraform reference
  • Monitoring metrics
  • Audit Trails events
  • FAQ
  1. Step-by-step guides
  2. Adding records

Adding records

Written by
Yandex Cloud
Improved by
valner
Updated at May 5, 2025

Note

Create a trigger that runs a Cloud Functions function or a Serverless Containers container when entries are added to a log group.

CLI
API

If you do not have the Yandex Cloud CLI yet, install and initialize it.

The folder specified when creating the CLI profile is used by default. To change the default folder, use the yc config set folder-id <folder_ID> command. You can specify a different folder using the --folder-name or --folder-id parameter.

To add records to a log group, run this command:

  • Linux, MacOS:
    yc logging write \
      --group-name=default \
      --message="My message" \
      --level=INFO \
      --json-payload='{"request_id": "1234"}'
    
  • Windows (cmd):
    yc logging write ^
      --group-name=default ^
      --message="My message" ^
      --level=INFO ^
      --json-payload="{"request_id": "1234"}"
    
  • Windows (PowerShell):
    yc logging write `
      --group-name=default `
      --message="My message" `
      --level=INFO `
      --json-payload='"{ \"request_id\": \"1234\" }"'
    

Where:

  • --group-name: Name of the log group to add records to. If this parameter is not specified, records are added to the default log group in the current folder. You can also specify --group-id instead of --group-name.
  • --message: Message.
  • --level: Logging level.
  • --json-payload: Additional information in JSON format.

Note

You can skip the --group-name, --message, and --json-payload flags and specify only the parameter values, keeping the order, e.g., default "My message" '{"request_id": "1234"}'.

To add records to the log group, use the LogIngestionService/Write gRPC API call.

See alsoSee also

  • Reading records
  • Monitoring

Was the article helpful?

Previous
All guides
Next
Reading records
Yandex project
© 2025 Yandex.Cloud LLC