diff options
author | Chris Knight <cknight1234@gmail.com> | 2020-06-18 11:50:18 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-06-18 12:50:18 +0200 |
commit | 940f8e8433ae5ec74b2642438849089a0433e512 (patch) | |
tree | 7611524db839edc816c5c77fdfeb711cfce6a757 /std/log/mod.ts | |
parent | 78a311aa5f6c56a750aaf3a7d3e8f911acf348d1 (diff) |
feat(std/log): expose logger name to LogRecord (#6316)
Diffstat (limited to 'std/log/mod.ts')
-rw-r--r-- | std/log/mod.ts | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/std/log/mod.ts b/std/log/mod.ts index f59a84449..a1a863d4a 100644 --- a/std/log/mod.ts +++ b/std/log/mod.ts @@ -65,7 +65,7 @@ export function getLogger(name?: string): Logger { } const result = state.loggers.get(name); if (!result) { - const logger = new Logger("NOTSET", []); + const logger = new Logger(name, "NOTSET", { handlers: [] }); state.loggers.set(name, logger); return logger; } @@ -191,7 +191,7 @@ export async function setup(config: LogConfig): Promise<void> { }); const levelName = loggerConfig.level || DEFAULT_LEVEL; - const logger = new Logger(levelName, handlers); + const logger = new Logger(loggerName, levelName, { handlers: handlers }); state.loggers.set(loggerName, logger); } } |