summaryrefslogtreecommitdiff
path: root/std/log/handlers.ts
diff options
context:
space:
mode:
Diffstat (limited to 'std/log/handlers.ts')
-rw-r--r--std/log/handlers.ts19
1 files changed, 11 insertions, 8 deletions
diff --git a/std/log/handlers.ts b/std/log/handlers.ts
index 93bdd3edd..5dfd0caa4 100644
--- a/std/log/handlers.ts
+++ b/std/log/handlers.ts
@@ -37,16 +37,19 @@ export class BaseHandler {
return this.formatter(logRecord);
}
- return this.formatter.replace(/{(\S+)}/g, (match, p1): string => {
- const value = logRecord[p1 as keyof LogRecord];
+ return this.formatter.replace(
+ /{(\S+)}/g,
+ (match, p1): string => {
+ const value = logRecord[p1 as keyof LogRecord];
- // do not interpolate missing values
- if (!value) {
- return match;
- }
+ // do not interpolate missing values
+ if (!value) {
+ return match;
+ }
- return String(value);
- });
+ return String(value);
+ }
+ );
}
log(_msg: string): void {}