summaryrefslogtreecommitdiff
path: root/std/log/mod.ts
diff options
context:
space:
mode:
authorRyan Dahl <ry@tinyclouds.org>2019-10-09 17:22:22 -0400
committerRyan Dahl <ry@tinyclouds.org>2019-10-09 17:22:22 -0400
commit93f7f00c956c14620ef031626f124b57397ca867 (patch)
treec5a9f536e79d2c8d2d02897511a9138acaf35394 /std/log/mod.ts
parent28293acd9c12a94f5d769706291032e844c7b92b (diff)
Run deno_std tests in github actions
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);