Skip to content

Commit

Permalink
fix: reduce noisy errors
Browse files Browse the repository at this point in the history
  • Loading branch information
gajus committed Jun 6, 2023
1 parent a95ad3c commit 645e112
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/forwarders/createSeqForwarder.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,13 @@ export const createSeqForwarder = (serverUrl: string) => {
const logger = new Logger({
maxRetries: 5,
onError: (error) => {
// eslint-disable-next-line no-console
console.error('[Seq Forwarder Error]', error);
if ('code' in error && error.code === 'ECONNREFUSED') {
// eslint-disable-next-line no-console
console.warn('[Seq Forwarder Error] cannot connect to Seq server');
} else {
// eslint-disable-next-line no-console
console.error('[Seq Forwarder Error]', error);
}
},
retryDelay: 5_000,
serverUrl,
Expand Down

0 comments on commit 645e112

Please sign in to comment.