Skip to content

Commit fd0e372

Browse files
authored
Update docs for logger (#1103)
Update docs for logger
1 parent 18e7f16 commit fd0e372

File tree

1 file changed

+14
-6
lines changed

1 file changed

+14
-6
lines changed

src/logger/index.ts

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ import {
88

99
/**
1010
* `LogSeverity` indicates the detailed severity of the log entry. See [LogSeverity](https://cloud.google.com/logging/docs/reference/v2/rest/v2/LogEntry#logseverity).
11+
* @public
1112
*/
1213
export type LogSeverity =
1314
| 'DEBUG'
@@ -23,6 +24,7 @@ export type LogSeverity =
2324
* `LogEntry` represents a [structured Cloud Logging](https://cloud.google.com/logging/docs/structured-logging)
2425
* entry. All keys aside from `severity` and `message` are
2526
* included in the `jsonPayload` of the logged entry.
27+
* @public
2628
*/
2729
export interface LogEntry {
2830
severity: LogSeverity;
@@ -62,7 +64,8 @@ function removeCircular(obj: any, refs: any[] = []): any {
6264

6365
/**
6466
* Writes a `LogEntry` to `stdout`/`stderr` (depending on severity).
65-
* @param entry The `LogEntry` including severity, message, and any additional structured metadata.
67+
* @param entry - The `LogEntry` including severity, message, and any additional structured metadata.
68+
* @public
6669
*/
6770
export function write(entry: LogEntry) {
6871
if (SUPPORTS_STRUCTURED_LOGS) {
@@ -94,7 +97,8 @@ export function write(entry: LogEntry) {
9497
/**
9598
* Writes a `DEBUG` severity log. If the last argument provided is a plain object,
9699
* it is added to the `jsonPayload` in the Cloud Logging entry.
97-
* @param args Arguments, concatenated into the log message with space separators.
100+
* @param args - Arguments, concatenated into the log message with space separators.
101+
* @public
98102
*/
99103
export function debug(...args: any[]) {
100104
write(entryFromArgs('DEBUG', args));
@@ -103,7 +107,8 @@ export function debug(...args: any[]) {
103107
/**
104108
* Writes an `INFO` severity log. If the last argument provided is a plain object,
105109
* it is added to the `jsonPayload` in the Cloud Logging entry.
106-
* @param args Arguments, concatenated into the log message with space separators.
110+
* @param args - Arguments, concatenated into the log message with space separators.
111+
* @public
107112
*/
108113
export function log(...args: any[]) {
109114
write(entryFromArgs('INFO', args));
@@ -112,7 +117,8 @@ export function log(...args: any[]) {
112117
/**
113118
* Writes an `INFO` severity log. If the last argument provided is a plain object,
114119
* it is added to the `jsonPayload` in the Cloud Logging entry.
115-
* @param args Arguments, concatenated into the log message with space separators.
120+
* @param args - Arguments, concatenated into the log message with space separators.
121+
* @public
116122
*/
117123
export function info(...args: any[]) {
118124
write(entryFromArgs('INFO', args));
@@ -121,7 +127,8 @@ export function info(...args: any[]) {
121127
/**
122128
* Writes a `WARNING` severity log. If the last argument provided is a plain object,
123129
* it is added to the `jsonPayload` in the Cloud Logging entry.
124-
* @param args Arguments, concatenated into the log message with space separators.
130+
* @param args - Arguments, concatenated into the log message with space separators.
131+
* @public
125132
*/
126133
export function warn(...args: any[]) {
127134
write(entryFromArgs('WARNING', args));
@@ -130,7 +137,8 @@ export function warn(...args: any[]) {
130137
/**
131138
* Writes an `ERROR` severity log. If the last argument provided is a plain object,
132139
* it is added to the `jsonPayload` in the Cloud Logging entry.
133-
* @param args Arguments, concatenated into the log message with space separators.
140+
* @param args - Arguments, concatenated into the log message with space separators.
141+
* @public
134142
*/
135143
export function error(...args: any[]) {
136144
write(entryFromArgs('ERROR', args));

0 commit comments

Comments
 (0)