diff options
author | Kitson Kelly <me@kitsonkelly.com> | 2020-03-29 04:03:49 +1100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-03-28 13:03:49 -0400 |
commit | bced52505f32d6cca4f944bb610a8a26767908a8 (patch) | |
tree | da49a5df4b7bd6f8306248069228cd6bd0db1303 /std/log/mod.ts | |
parent | 1397b8e0e7c85762e19d88fde103342bfa563360 (diff) |
Update to Prettier 2 and use ES Private Fields (#4498)
Diffstat (limited to 'std/log/mod.ts')
-rw-r--r-- | std/log/mod.ts | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/std/log/mod.ts b/std/log/mod.ts index b89896264..333e90fb9 100644 --- a/std/log/mod.ts +++ b/std/log/mod.ts @@ -4,7 +4,7 @@ import { BaseHandler, ConsoleHandler, WriterHandler, - FileHandler + FileHandler, } from "./handlers.ts"; import { assert } from "../testing/asserts.ts"; @@ -25,28 +25,28 @@ export interface LogConfig { const DEFAULT_LEVEL = "INFO"; const DEFAULT_CONFIG: LogConfig = { handlers: { - default: new ConsoleHandler(DEFAULT_LEVEL) + default: new ConsoleHandler(DEFAULT_LEVEL), }, loggers: { default: { level: DEFAULT_LEVEL, - handlers: ["default"] - } - } + handlers: ["default"], + }, + }, }; const state = { handlers: new Map<string, BaseHandler>(), loggers: new Map<string, Logger>(), - config: DEFAULT_CONFIG + config: DEFAULT_CONFIG, }; export const handlers = { BaseHandler, ConsoleHandler, WriterHandler, - FileHandler + FileHandler, }; export function getLogger(name?: string): Logger { @@ -81,7 +81,7 @@ export const critical = (msg: string, ...args: unknown[]): void => export async function setup(config: LogConfig): Promise<void> { state.config = { handlers: { ...DEFAULT_CONFIG.handlers, ...config.handlers }, - loggers: { ...DEFAULT_CONFIG.loggers, ...config.loggers } + loggers: { ...DEFAULT_CONFIG.loggers, ...config.loggers }, }; // tear down existing handlers |