Adding records
Note
CLI
API
If you do not 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 add records to a log group, run the 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.--message
: Message.--level
: Logging level.--json-payload
: Additional information in JSON format.
To add entries to the log group, use the LogIngestionService/Write gRPC API call.