Skip to content

Commit c437bdc

Browse files
author
DataUI VCS Robot
committed
Release 30.12.2021
1 parent 9046a70 commit c437bdc

File tree

116 files changed

+1640
-636
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

116 files changed

+1640
-636
lines changed
Loading
Loading
Loading
Loading
Loading
Loading
23.3 KB
Loading
Loading
Loading
Loading
Loading
Loading
Loading
44.6 KB
Loading
Loading
76.5 KB
Loading
Loading
45.3 KB
Loading

en/_includes/logging/read-logs.md

Lines changed: 50 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -6,70 +6,75 @@ You can filter records using the [language of filter expressions](../../logging/
66

77
- Management console
88

9-
1. In the [management console]({{ link-console-main }}), go to the folder where the log group is located.
10-
1. Open **{{ cloud-logging-name }}**.
11-
1. Click the **Groups** tab.
12-
1. Click on the line with the log group you want to view.
13-
1. Click the **Logs** tab.
14-
1. The page that opens will show the log group records.
9+
1. In the [management console]({{ link-console-main }}), go to the folder where the log group is located.
10+
1. Open **{{ cloud-logging-name }}**.
11+
1. Click the **Groups** tab.
12+
1. Click on the line with the log group you want to view.
13+
1. Click the **Logs** tab.
14+
1. The page that opens will show the log group records.
1515

1616
- CLI
1717

18-
{% include [cli-install](../cli-install.md) %}
18+
{% include [cli-install](../cli-install.md) %}
1919

20-
{% include [default-catalogue](../default-catalogue.md) %}
20+
{% include [default-catalogue](../default-catalogue.md) %}
2121

22-
When viewing the log, you can set a specific interval using the `--since` and `--until` flags. If no time interval is specified, information for the previous hour is displayed.
22+
When viewing the log, you can set a specific interval using the `--since` and `--until` flags. If no time interval is specified, information for the previous hour is displayed.
2323

24-
The following flags are used:
25-
26-
* `--since`: Time N and later.
27-
* `--until`: Time N and earlier.
24+
The following flags are used:
2825

29-
If you only specify one flag, information is displayed for the hour before or after N depending on the flag.
26+
* `--since`: Time N and later.
27+
* `--until`: Time N and earlier.
3028

31-
Allowed time formats:
32-
33-
* `HH:MM:SS`. Example: `15:04:05`.
34-
* [RFC-3339](https://www.ietf.org/rfc/rfc3339.txt). Example: `2006-01-02T15:04:05Z`, `2h`, `3h30m ago`.
29+
If you only specify one flag, information is displayed for the hour before or after N depending on the flag.
3530

36-
To access a log group, use its name or unique ID. To find them, [get](../../logging/operations/list.md) a list of log groups in the folder. If you don't specify the name or ID, the records are output from the [default log group](../../logging/concepts/log-group.md) of the current folder.
31+
Allowed time formats:
3732

38-
To view the records in JSON format, run the command:
33+
* `HH:MM:SS`. Example: `15:04:05`.
34+
* [RFC-3339](https://www.ietf.org/rfc/rfc3339.txt). Example: `2006-01-02T15:04:05Z`, `2h`, `3h30m ago`.
3935

40-
```
41-
yc logging read --group-name=default --format=json
42-
```
36+
To access a log group, use its name or unique ID. To find them, [get](../../logging/operations/list.md) a list of log groups in the folder. If you don't specify the name or ID, the records are output from the [default log group](../../logging/concepts/log-group.md) of the current folder.
4337

44-
Result:
38+
To view the records in JSON format, run the command:
4539

46-
```
47-
[
48-
{
49-
"uid": "488ece3c-75b8-4d35-95ac-2b491b123472",
50-
"resource": {},
51-
"timestamp": "2021-06-22T02:10:40Z",
52-
"ingested_at": "2021-06-22T08:49:15.716Z",
53-
"saved_at": "2021-06-22T08:49:16.176097Z",
54-
"level": "INFO",
55-
"message": "My message",
56-
"json_payload": {
57-
"request_id": "1234"
58-
}
59-
}
60-
]
61-
```
40+
```
41+
yc logging read --group-name=default --format=json
42+
```
6243
63-
To read records as they appear, use the `--follow` flag:
44+
Result:
6445
65-
```
66-
yc logging read --group-name=default --follow
67-
```
46+
```
47+
[
48+
{
49+
"uid": "488ece3c-75b8-4d35-95ac-2b491b123472",
50+
"resource": {},
51+
"timestamp": "2021-06-22T02:10:40Z",
52+
"ingested_at": "2021-06-22T08:49:15.716Z",
53+
"saved_at": "2021-06-22T08:49:16.176097Z",
54+
"level": "INFO",
55+
"message": "My message",
56+
"json_payload": {
57+
"request_id": "1234"
58+
}
59+
}
60+
]
61+
```
6862
69-
This command will return records for the last hour and continue to return new ones until you interrupt it with **Ctrl+C**. The `--follow` flag is not compatible with the `--since` and `--until` flags.
63+
To read records as they appear, use the `--follow` flag:
64+
65+
```
66+
yc logging read --group-name=default --follow
67+
```
68+
69+
This command will return records for the last hour and continue to return new ones until you interrupt it with **Ctrl+C**. The `--follow` flag is not compatible with the `--since` and `--until` flags.
70+
71+
- API
72+
73+
You can view the entries in a log group using the API [read](../../logging/api-ref/grpc/log_reading_service.md) method.
7074
7175
- API
7276
7377
You can view the entries in a log group using the API [read](../../logging/api-ref/grpc/log_reading_service.md) method.
7478
7579
{% endlist %}
80+

en/_includes/logging/write-logs.md

Lines changed: 21 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -2,25 +2,30 @@
22

33
- CLI
44

5-
{% include [cli-install](../cli-install.md) %}
5+
{% include [cli-install](../cli-install.md) %}
66

7-
{% include [default-catalogue](../default-catalogue.md) %}
7+
{% include [default-catalogue](../default-catalogue.md) %}
88

9-
To add records to a log group, run the command:
9+
To add records to a log group, run the command:
1010

11-
```
12-
yc logging write \
13-
--group-name=default \
14-
--message="My message" \
15-
--timestamp="2021-06-08T19:10:40.000Z" \
16-
--level=INFO \
17-
--json-payload='{"request_id": "1234"}'
18-
```
11+
```
12+
yc logging write \
13+
--group-name=default \
14+
--message="My message" \
15+
--timestamp="2021-06-08T19:10:40.000Z" \
16+
--level=INFO \
17+
--json-payload='{"request_id": "1234"}'
18+
```
1919
20-
* `--group-name`: Name of the log group to add records to. Optional parameter. If this parameter is omitted, records are added to the [default log group](../../logging/concepts/log-group.md) of the current folder.
21-
* `--message`: Message.
22-
* `--timestamp`: Time when the record is sent.
23-
* `--level`: Logging level.
24-
* `--json-payload`: Additional information in JSON format.
20+
* `--group-name`: Name of the log group to add records to. Optional. If this parameter is omitted, records are added to the [default log group](../../logging/concepts/log-group.md) of the current folder.
21+
* `--message`: Message.
22+
* `--timestamp`: Time when the record is sent.
23+
* `--level`: Logging level.
24+
* `--json-payload`: Additional information in JSON format.
25+
26+
- API
27+
28+
You can add entries to a log group using the API [write](../../logging/api-ref/grpc/log_ingestion_service.md) method.
2529
2630
{% endlist %}
31+

0 commit comments

Comments
 (0)