Skip to content

Commit 9bff5a0

Browse files
chore: handle PR comments
1 parent 9509b74 commit 9bff5a0

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

PublicAPI.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1525,7 +1525,7 @@ tns.cleanupService.setCleanupLogFile("/Users/username/cleanup-logs.txt");
15251525
```
15261526
15271527
## initializeService
1528-
The `initializeService` is used to initialize CLI's configuration and the beginning and print all warnings related to current environment.
1528+
The `initializeService` is used to initialize CLI's configuration at the beginning and print all warnings related to current environment.
15291529
15301530
### initialize
15311531
This method inits CLI's logger and prints all system warnings.

lib/common/logger/appenders/emit-appender.ts

+8-8
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,6 @@ function emitAppender(layout: Function, emitter: EventEmitter) {
1515
}
1616

1717
function configure(config: Log4JSEmitAppenderConfiguration, layouts: any) {
18-
// the default layout for the appender
19-
let layout = layouts.messagePassThroughLayout;
20-
21-
// check if there is another layout specified
22-
if (config.layout) {
23-
layout = layouts.layout(config.layout.type, config.layout);
24-
}
25-
2618
if (!config.emitter) {
2719
throw new Error("Emitter must be passed to emit-appender");
2820
}
@@ -31,6 +23,14 @@ function configure(config: Log4JSEmitAppenderConfiguration, layouts: any) {
3123
throw new Error("The passed emitter must be instance of EventEmitter");
3224
}
3325

26+
// the default layout for the appender
27+
let layout = layouts.messagePassThroughLayout;
28+
29+
// check if there is another layout specified
30+
if (config.layout) {
31+
layout = layouts.layout(config.layout.type, config.layout);
32+
}
33+
3434
// create a new appender instance
3535
return emitAppender(layout, config.emitter);
3636
}

0 commit comments

Comments
 (0)