Skip to content

Commit 4939e4c

Browse files
committed
fix(logger): harden bind output
1 parent 23d9a1f commit 4939e4c

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

packages/logger/src/logger.ts

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -100,10 +100,12 @@ export class Logger {
100100
// Create aliases for the log methods, allowing them to be used in a
101101
// manner similar to the console object.
102102
const bind = (level: LogLevel): LogMethod =>
103-
this.#dispatch.bind(this, {
104-
...this.#options,
105-
level,
106-
}) as LogMethod;
103+
harden(
104+
this.#dispatch.bind(this, {
105+
...this.#options,
106+
level,
107+
}),
108+
) as LogMethod;
107109
this.log = bind('log');
108110
this.debug = bind('debug');
109111
this.info = bind('info');

0 commit comments

Comments
 (0)