Skip to content

Commit

Permalink
fix(seq): fix seq off log level
Browse files Browse the repository at this point in the history
  • Loading branch information
OskarLebuda authored and Romakita committed Aug 22, 2019
1 parent 50a4a1d commit f1afe84
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 11 deletions.
2 changes: 1 addition & 1 deletion packages/seq/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ export class Calendar {
}
```

Then we should see the log in the Seq panel (by default `localhost:5341`)
Then we should see the log in the Seq panel (by default `localhost:80`)

## Maintainer

Expand Down
22 changes: 12 additions & 10 deletions packages/seq/src/appenders/SeqAppender.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,21 +35,23 @@ export class SeqAppender extends BaseAppender {
private logger: any;

build() {
this.logger = createLogger({
name: $log.name,
streams: [
createStream({
serverUrl: this.config.url,
level: $log.level
})
]
});
if ($log.level !== "OFF") {
this.logger = createLogger({
name: $log.name,
streams: [
createStream({
serverUrl: this.config.url,
level: $log.level
})
]
});
}
}

write(loggingEvent: LogEvent) {
const level = loggingEvent.level.toString().toLowerCase();

if (this.logger[level]) {
if (level !== "OFF" && this.logger[level]) {
this.logger[level](...loggingEvent.data);
}
}
Expand Down

0 comments on commit f1afe84

Please sign in to comment.