diff options
| author | Ryan Dahl <ry@tinyclouds.org> | 2019-01-06 14:19:15 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-01-06 14:19:15 -0500 |
| commit | c164e696d7f924fe785421058d834934b7014429 (patch) | |
| tree | 90af4dd0f6f5bd2e3149c8af1f8fc8b1247d03dc /logging/index.ts | |
| parent | 68584f983e4b1cf81d84cdb57bb5459127293cd2 (diff) | |
Fix format globs (denoland/deno_std#87)
Original: https://github.com/denoland/deno_std/commit/297cf0975eca194a677e6fadd7d753d62eb453c3
Diffstat (limited to 'logging/index.ts')
| -rw-r--r-- | logging/index.ts | 34 |
1 files changed, 21 insertions, 13 deletions
diff --git a/logging/index.ts b/logging/index.ts index 2b2394043..e8c762ac6 100644 --- a/logging/index.ts +++ b/logging/index.ts @@ -1,5 +1,10 @@ import { Logger } from "./logger.ts"; -import { BaseHandler, ConsoleHandler, WriterHandler, FileHandler } from "./handlers.ts"; +import { + BaseHandler, + ConsoleHandler, + WriterHandler, + FileHandler +} from "./handlers.ts"; export class LoggerConfig { level?: string; @@ -18,14 +23,12 @@ export interface LogConfig { const DEFAULT_LEVEL = "INFO"; const DEFAULT_NAME = ""; const DEFAULT_CONFIG: LogConfig = { - handlers: { - - }, + handlers: {}, loggers: { "": { level: "INFO", - handlers: [""], + handlers: [""] } } }; @@ -38,21 +41,26 @@ const state = { defaultLogger, handlers: new Map(), loggers: new Map(), - config: DEFAULT_CONFIG, + config: DEFAULT_CONFIG }; export const handlers = { BaseHandler, ConsoleHandler, WriterHandler, - FileHandler, + FileHandler }; -export const debug = (msg: string, ...args: any[]) => defaultLogger.debug(msg, ...args); -export const info = (msg: string, ...args: any[]) => defaultLogger.info(msg, ...args); -export const warning = (msg: string, ...args: any[]) => defaultLogger.warning(msg, ...args); -export const error = (msg: string, ...args: any[]) => defaultLogger.error(msg, ...args); -export const critical = (msg: string, ...args: any[]) => defaultLogger.critical(msg, ...args); +export const debug = (msg: string, ...args: any[]) => + defaultLogger.debug(msg, ...args); +export const info = (msg: string, ...args: any[]) => + defaultLogger.info(msg, ...args); +export const warning = (msg: string, ...args: any[]) => + defaultLogger.warning(msg, ...args); +export const error = (msg: string, ...args: any[]) => + defaultLogger.error(msg, ...args); +export const critical = (msg: string, ...args: any[]) => + defaultLogger.critical(msg, ...args); export function getLogger(name?: string) { if (!name) { @@ -108,4 +116,4 @@ export async function setup(config: LogConfig) { } } -setup(DEFAULT_CONFIG);
\ No newline at end of file +setup(DEFAULT_CONFIG); |
