@@ -12,9 +12,8 @@ Web Services.
12
12
13
13
* [ Setup] ( #setup )
14
14
* [ Samples] ( #samples )
15
- * [ Reading logs] ( #reading-logs )
16
- * [ Writing logs] ( #writing-logs )
17
- * [ Exporting logs] ( #exporting-logs )
15
+ * [ Logs] ( #logs )
16
+ * [ Sinks] ( #sinks )
18
17
* [ Error Reporting on Compute Engine] ( #error-reporting-on-compute-engine )
19
18
* [ Logging to Google Cloud with Winston] ( https://github.com/GoogleCloudPlatform/winston-gae )
20
19
@@ -30,38 +29,71 @@ Web Services.
30
29
31
30
## Samples
32
31
33
- ### Reading logs
32
+ ### Logs
34
33
35
- View the [ documentation] [ read_docs ] or the [ source code] [ read_code ] .
34
+ View the [ documentation] [ logs_docs ] or the [ source code] [ logs_code ] .
36
35
37
- __ Run the sample :__
36
+ __ Usage :__ ` node logs --help `
38
37
39
- node list
38
+ ```
39
+ Commands:
40
+ list List log entries in the authenticated project.
41
+ write <name> <resource> <entry> Write a log entry.
42
+ delete <name> Delete a Log.
40
43
41
- [ read_docs ] : https://cloud.google.com/logging/docs/api/tasks/authorization
42
- [ read_code ] : list.js
44
+ Options:
45
+ --help Show help [boolean]
43
46
44
- ### Writing logs
47
+ Examples:
48
+ node logs list List all log entires.
49
+ node logs list -f "severity = ERROR" -s List up to 2 error entries, sorted by
50
+ "timestamp" -l 2 timestamp ascending.
51
+ node logs write my-log Write a log entry.
52
+ '{"type":"gae_app","labels":{"module_id":"default"
53
+ }}' '{"message":"Hello World!"}'
54
+ node logs delete my-log Delete "my-log".
45
55
46
- View the [ documentation] [ write_docs ] or the [ source code] [ write_code ] .
56
+ For more information, see https://cloud.google.com/logging/docs
57
+ ```
47
58
48
- __ Run the sample:__
59
+ [ logs_docs ] : https://cloud.google.com/logging/docs
60
+ [ logs_code ] : logs.js
49
61
50
- node write
62
+ ### Sinks
51
63
52
- [ write_docs ] : https://cloud.google.com/logging/docs/api/tasks/creating-logs
53
- [ write_code ] : write.js
64
+ View the [ documentation] [ sinks_docs ] or the [ source code] [ sinks_code ] .
54
65
55
- ### Exporting logs
66
+ __ Usage: __ ` node sinks --help `
56
67
57
- View the [ documentation] [ export_docs ] or the [ source code] [ export_code ] .
68
+ ```
69
+ Commands:
70
+ create <name> <destination> Create a new sink with the given name and destination.
71
+ get <name> Get the metadata for the specified sink.
72
+ list List all sinks in the authenticated project.
73
+ update <name> <metadata> Update the metadata for the specified sink.
74
+ delete <name> Delete the specified sink.
58
75
59
- __ Run the sample:__
76
+ Options:
77
+ --help Show help [boolean]
60
78
61
- node export
79
+ Examples:
80
+ node sinks create my-sink my-bucket --type bucket Create a new sink named "my-sink" that exports
81
+ logs to a Cloud Storage bucket.
82
+ node sinks create my-sink my-dataset --type Create a new sink named "my-sink" that exports
83
+ dataset logs to a BigQuery dataset.
84
+ node sinks create my-sink my-topic --type topic Create a new sink named "my-sink" that exports
85
+ logs to a Cloud Pub/Sub topic.
86
+ node sinks get my-sink Get the metadata for "my-sink".
87
+ node sinks list List all sinks in the authenticated project.
88
+ node sinks update my-sink '{"filter":"severity > Update the specified sink.
89
+ ALERT"}'
90
+ node sinks delete my-sink Delete "my-sink".
62
91
63
- [ export_docs ] : https://cloud.google.com/logging/docs/api/tasks/exporting-logs
64
- [ export_code ] : export.js
92
+ For more information, see https://cloud.google.com/logging/docs
93
+ ```
94
+
95
+ [ sinks_docs ] : https://cloud.google.com/logging/docs
96
+ [ sinks_code ] : sinks.js
65
97
66
98
### Error Reporting on Compute Engine
67
99
0 commit comments