Yandex Cloud
Search
Contact UsGet started
  • Pricing
  • Customer Stories
  • Documentation
  • Blog
  • All Services
  • System Status
    • Featured
    • Infrastructure & Network
    • Data Platform
    • Containers
    • Developer tools
    • Serverless
    • Security
    • Monitoring & Resources
    • ML Services
    • Business tools
  • All Solutions
    • By industry
    • By use case
    • Economics and Pricing
    • Security
    • Technical Support
    • Start testing with double trial credits
    • Cloud credits to scale your IT product
    • Gateway to Russia
    • Cloud for Startups
    • Center for Technologies and Society
    • Yandex Cloud Partner program
  • Pricing
  • Customer Stories
  • Documentation
  • Blog
© 2025 Direct Cursus Technology L.L.C.
Yandex Cloud Logging
  • Getting started
    • All guides
    • Adding records
    • Reading records
    • Managing log group access permissions
  • Access management
  • Pricing policy
  • Terraform reference
  • Monitoring metrics
  • Audit Trails events
  • Release notes
  • FAQ
  1. Step-by-step guides
  2. Adding records

Adding records

Written by
Yandex Cloud
Improved by
valner
Updated at October 12, 2025

Note

You can create a trigger that will invoke a function in Cloud Functions or run a container in Serverless Containers whenever records are added to the log group.

CLI
API

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

By default, the CLI uses the folder specified when creating the profile. To change the default folder, use the yc config set folder-id <folder_ID> command. You can also set a different folder for any specific command 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 where you want to add records. If you leave it unspecified, the system will add records to the default log group in the current folder. You can 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 parameters and provide only the values in the right order, e.g., default "My message" '{"request_id": "1234"}'.

To add records to a 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
© 2025 Direct Cursus Technology L.L.C.