Skip to content

Commit 272ca33

Browse files
authored
Lint
1 parent 0deac47 commit 272ca33

File tree

1 file changed

+11
-5
lines changed

1 file changed

+11
-5
lines changed

src/logger/index.ts

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,10 @@
2020
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
2121
// SOFTWARE.
2222

23-
import {format} from "util";
24-
import {traceContext} from "../common/trace";
23+
import { format } from "util";
24+
import { traceContext } from "../common/trace";
2525

26-
import {CONSOLE_SEVERITY, UNPATCHED_CONSOLE} from "./common";
26+
import { CONSOLE_SEVERITY, UNPATCHED_CONSOLE } from "./common";
2727

2828
/**
2929
* `LogSeverity` indicates the detailed severity of the log entry. See [LogSeverity](https://cloud.google.com/logging/docs/reference/v2/rest/v2/LogEntry#logseverity).
@@ -94,7 +94,9 @@ export function write(entry: LogEntry) {
9494
] = `projects/${process.env.GCLOUD_PROJECT}/traces/${ctx.traceId}`;
9595
}
9696

97-
UNPATCHED_CONSOLE[CONSOLE_SEVERITY[entry.severity]](JSON.stringify(removeCircular(entry)));
97+
UNPATCHED_CONSOLE[CONSOLE_SEVERITY[entry.severity]](
98+
JSON.stringify(removeCircular(entry))
99+
);
98100
}
99101

100102
/**
@@ -151,7 +153,11 @@ export function error(...args: any[]) {
151153
function entryFromArgs(severity: LogSeverity, args: any[]): LogEntry {
152154
let entry = {};
153155
const lastArg = args[args.length - 1];
154-
if (lastArg && typeof lastArg === "object" && lastArg.constructor === Object) {
156+
if (
157+
lastArg &&
158+
typeof lastArg === "object" &&
159+
lastArg.constructor === Object
160+
) {
155161
entry = args.pop();
156162
}
157163

0 commit comments

Comments
 (0)