Skip to content

Commit

Permalink
feat: filter warnings from PD (#4771)
Browse files Browse the repository at this point in the history
Signed-off-by: Matt Rice <[email protected]>
  • Loading branch information
mrice32 authored Jul 19, 2024
1 parent e31b1b0 commit f72d0b7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/logger/src/logger/Transports.ts
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ export function createTransports(transportsConfig: TransportsConfig = {}): Trans
if (transportsConfig.pdApiToken || process.env.PAGER_DUTY_CONFIG) {
transports.push(
new PagerDutyTransport(
{ level: "warn" },
{ level: "error" },
transportsConfig.pagerDutyConfig ?? JSON.parse(process.env.PAGER_DUTY_CONFIG || "null")
)
);
Expand All @@ -103,7 +103,7 @@ export function createTransports(transportsConfig: TransportsConfig = {}): Trans
transportsConfig.pagerDutyV2Config ?? JSON.parse(process.env.PAGER_DUTY_V2_CONFIG || "null");
// this will throw an error if an invalid configuration is present
if (!disabled) {
transports.push(new PagerDutyV2Transport({ level: "warn" }, pagerDutyV2CreateConfig(pagerDutyV2Config)));
transports.push(new PagerDutyV2Transport({ level: "error" }, pagerDutyV2CreateConfig(pagerDutyV2Config)));
}
}
}
Expand Down

0 comments on commit f72d0b7

Please sign in to comment.