You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/logger.ts
+10-8Lines changed: 10 additions & 8 deletions
Original file line number
Diff line number
Diff line change
@@ -7,7 +7,7 @@ import {
7
7
}from'./logger/common';
8
8
9
9
/**
10
-
* `LogSeverity` indicates the detailed severity of the log entry. See [LogSeverity](https://cloud.google.com/logging/docs/reference/v2/rest/v2/LogEntry#logseverity) for more.
10
+
* `LogSeverity` indicates the detailed severity of the log entry. See [LogSeverity](https://cloud.google.com/logging/docs/reference/v2/rest/v2/LogEntry#logseverity).
11
11
*/
12
12
exporttypeLogSeverity=
13
13
|'DEBUG'
@@ -20,7 +20,8 @@ export type LogSeverity =
20
20
|'EMERGENCY';
21
21
22
22
/**
23
-
* `LogEntry` represents a structured Cloud Logging entry. All keys aside from `severity` and `message` are
23
+
* `LogEntry` represents a [structured Cloud Logging](https://cloud.google.com/logging/docs/structured-logging)
24
+
* entry. All keys aside from `severity` and `message` are
24
25
* included in the `jsonPayload` of the logged entry.
25
26
*/
26
27
exportinterfaceLogEntry{
@@ -31,7 +32,7 @@ export interface LogEntry {
31
32
32
33
/**
33
34
* Writes a `LogEntry` to `stdout`/`stderr` (depending on severity).
34
-
* @param entry The LogEntry including severity, message, and any additional structured metadata.
35
+
* @param entry The `LogEntry` including severity, message, and any additional structured metadata.
35
36
*/
36
37
exportfunctionwrite(entry: LogEntry){
37
38
if(SUPPORTS_STRUCTURED_LOGS){
@@ -56,7 +57,7 @@ export function write(entry: LogEntry) {
56
57
57
58
/**
58
59
* Writes a `DEBUG` severity log. If the last argument provided is a plain object,
59
-
* it will be added to the `jsonPayload` in the Cloud Logging entry.
60
+
* it is added to the `jsonPayload` in the Cloud Logging entry.
60
61
* @param args Arguments, concatenated into the log message with space separators.
61
62
*/
62
63
exportfunctiondebug(...args: any[]){
@@ -65,7 +66,7 @@ export function debug(...args: any[]) {
65
66
66
67
/**
67
68
* Writes an `INFO` severity log. If the last argument provided is a plain object,
68
-
* it will be added to the `jsonPayload` in the Cloud Logging entry.
69
+
* it is added to the `jsonPayload` in the Cloud Logging entry.
69
70
* @param args Arguments, concatenated into the log message with space separators.
70
71
*/
71
72
exportfunctionlog(...args: any[]){
@@ -74,7 +75,7 @@ export function log(...args: any[]) {
74
75
75
76
/**
76
77
* Writes an `INFO` severity log. If the last argument provided is a plain object,
77
-
* it will be added to the `jsonPayload` in the Cloud Logging entry.
78
+
* it is added to the `jsonPayload` in the Cloud Logging entry.
78
79
* @param args Arguments, concatenated into the log message with space separators.
79
80
*/
80
81
exportfunctioninfo(...args: any[]){
@@ -83,7 +84,7 @@ export function info(...args: any[]) {
83
84
84
85
/**
85
86
* Writes a `WARNING` severity log. If the last argument provided is a plain object,
86
-
* it will be added to the `jsonPayload` in the Cloud Logging entry.
87
+
* it is added to the `jsonPayload` in the Cloud Logging entry.
87
88
* @param args Arguments, concatenated into the log message with space separators.
88
89
*/
89
90
exportfunctionwarn(...args: any[]){
@@ -92,13 +93,14 @@ export function warn(...args: any[]) {
92
93
93
94
/**
94
95
* Writes an `ERROR` severity log. If the last argument provided is a plain object,
95
-
* it will be added to the `jsonPayload` in the Cloud Logging entry.
96
+
* it is added to the `jsonPayload` in the Cloud Logging entry.
96
97
* @param args Arguments, concatenated into the log message with space separators.
0 commit comments