Skip to content

Commit be8b332

Browse files
fix: reduce logging (#3200)
Co-authored-by: Meier Lukas <[email protected]>
1 parent 109f9e7 commit be8b332

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

packages/common/src/fetch-agent.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ export class LoggingAgent extends Agent {
2424
url.searchParams.set(key, "REDACTED");
2525
});
2626

27-
logger.info(
27+
logger.debug(
2828
`Dispatching request ${url.toString().replaceAll("=&", "&")} (${Object.keys(options.headers ?? {}).length} headers)`,
2929
);
3030
return super.dispatch(options, handler);

packages/common/src/test/fetch-agent.spec.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ const REDACTED = "REDACTED";
2121
describe("LoggingAgent should log all requests", () => {
2222
test("should log all requests", () => {
2323
// Arrange
24-
const infoLogSpy = vi.spyOn(logger, "info");
24+
const infoLogSpy = vi.spyOn(logger, "debug");
2525
const agent = new LoggingAgent();
2626

2727
// Act
@@ -33,7 +33,7 @@ describe("LoggingAgent should log all requests", () => {
3333

3434
test("should show amount of headers", () => {
3535
// Arrange
36-
const infoLogSpy = vi.spyOn(logger, "info");
36+
const infoLogSpy = vi.spyOn(logger, "debug");
3737
const agent = new LoggingAgent();
3838

3939
// Act
@@ -68,7 +68,7 @@ describe("LoggingAgent should log all requests", () => {
6868
[`/?stringWith13Chars=${"a".repeat(13)}`, `/?stringWith13Chars=${REDACTED}`],
6969
])("should redact sensitive data in url https://homarr.dev%s", (path, expected) => {
7070
// Arrange
71-
const infoLogSpy = vi.spyOn(logger, "info");
71+
const infoLogSpy = vi.spyOn(logger, "debug");
7272
const agent = new LoggingAgent();
7373

7474
// Act
@@ -87,7 +87,7 @@ describe("LoggingAgent should log all requests", () => {
8787
["date times", "/?datetime=2022-01-01T00:00:00.000Z"],
8888
])("should not redact values that are %s", (_reason, path) => {
8989
// Arrange
90-
const infoLogSpy = vi.spyOn(logger, "info");
90+
const infoLogSpy = vi.spyOn(logger, "debug");
9191
const agent = new LoggingAgent();
9292

9393
// Act

packages/cron-jobs-core/src/creator.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ const createCallback = <TAllowedNames extends string, TName extends TAllowedName
2828
options: CreateCronJobOptions,
2929
creatorOptions: CreateCronJobCreatorOptions<TAllowedNames>,
3030
) => {
31-
const expectedMaximumDurationInMillis = options.expectedMaximumDurationInMillis ?? 1000;
31+
const expectedMaximumDurationInMillis = options.expectedMaximumDurationInMillis ?? 2500;
3232
return (callback: () => MaybePromise<void>) => {
3333
const catchingCallbackAsync = async () => {
3434
try {

0 commit comments

Comments
 (0)