summaryrefslogtreecommitdiff
path: root/std/log/mod.ts
diff options
context:
space:
mode:
Diffstat (limited to 'std/log/mod.ts')
-rw-r--r--std/log/mod.ts18
1 files changed, 11 insertions, 7 deletions
diff --git a/std/log/mod.ts b/std/log/mod.ts
index 3f34d7f1d..cb166376e 100644
--- a/std/log/mod.ts
+++ b/std/log/mod.ts
@@ -80,9 +80,11 @@ export async function setup(config: LogConfig): Promise<void> {
};
// tear down existing handlers
- state.handlers.forEach((handler): void => {
- handler.destroy();
- });
+ state.handlers.forEach(
+ (handler): void => {
+ handler.destroy();
+ }
+ );
state.handlers.clear();
// setup handlers
@@ -104,11 +106,13 @@ export async function setup(config: LogConfig): Promise<void> {
const handlerNames = loggerConfig.handlers || [];
const handlers: BaseHandler[] = [];
- handlerNames.forEach((handlerName): void => {
- if (state.handlers.has(handlerName)) {
- handlers.push(state.handlers.get(handlerName)!);
+ handlerNames.forEach(
+ (handlerName): void => {
+ if (state.handlers.has(handlerName)) {
+ handlers.push(state.handlers.get(handlerName)!);
+ }
}
- });
+ );
const levelName = loggerConfig.level || DEFAULT_LEVEL;
const logger = new Logger(levelName, handlers);