Skip to content

A modern and easy to use dashboard. 80+ integrations. 20K+ icons built in. Authentication out of the box. No YAML, drag and drop configuration.

fix: reduce logging (#3200)

Manuelbe8b332f942b
diff --git a/packages/common/src/fetch-agent.ts b/packages/common/src/fetch-agent.ts
index f19a866af..f09261848 100644
--- a/packages/common/src/fetch-agent.ts
+++ b/packages/common/src/fetch-agent.ts
@@ -24,7 +24,7 @@ export class LoggingAgent extends Agent {
url.searchParams.set(key, "REDACTED");
});
- logger.info(
+ logger.debug(
`Dispatching request ${url.toString().replaceAll("=&", "&")} (${Object.keys(options.headers ?? {}).length} headers)`,
);
return super.dispatch(options, handler);
diff --git a/packages/common/src/test/fetch-agent.spec.ts b/packages/common/src/test/fetch-agent.spec.ts
index 064335018..12cb8040d 100644
--- a/packages/common/src/test/fetch-agent.spec.ts
+++ b/packages/common/src/test/fetch-agent.spec.ts
@@ -21,7 +21,7 @@ const REDACTED = "REDACTED";
describe("LoggingAgent should log all requests", () => {
test("should log all requests", () => {
// Arrange
- const infoLogSpy = vi.spyOn(logger, "info");
+ const infoLogSpy = vi.spyOn(logger, "debug");
const agent = new LoggingAgent();
// Act
@@ -33,7 +33,7 @@ describe("LoggingAgent should log all requests", () => {
test("should show amount of headers", () => {
// Arrange
- const infoLogSpy = vi.spyOn(logger, "info");
+ const infoLogSpy = vi.spyOn(logger, "debug");
const agent = new LoggingAgent();
// Act
@@ -68,7 +68,7 @@ describe("LoggingAgent should log all requests", () => {
[`/?stringWith13Chars=${"a".repeat(13)}`, `/?stringWith13Chars=${REDACTED}`],
])("should redact sensitive data in url https://homarr.dev%s", (path, expected) => {
// Arrange
- const infoLogSpy = vi.spyOn(logger, "info");
+ const infoLogSpy = vi.spyOn(logger, "debug");
const agent = new LoggingAgent();
// Act
@@ -87,7 +87,7 @@ describe("LoggingAgent should log all requests", () => {
["date times", "/?datetime=2022-01-01T00:00:00.000Z"],
])("should not redact values that are %s", (_reason, path) => {
// Arrange
- const infoLogSpy = vi.spyOn(logger, "info");
+ const infoLogSpy = vi.spyOn(logger, "debug");
const agent = new LoggingAgent();
// Act
diff --git a/packages/cron-jobs-core/src/creator.ts b/packages/cron-jobs-core/src/creator.ts
index e257a3843..aefdb66f0 100644
--- a/packages/cron-jobs-core/src/creator.ts
+++ b/packages/cron-jobs-core/src/creator.ts
@@ -28,7 +28,7 @@ const createCallback = <TAllowedNames extends string, TName extends TAllowedName
options: CreateCronJobOptions,
creatorOptions: CreateCronJobCreatorOptions<TAllowedNames>,
) => {
- const expectedMaximumDurationInMillis = options.expectedMaximumDurationInMillis ?? 1000;
+ const expectedMaximumDurationInMillis = options.expectedMaximumDurationInMillis ?? 2500;
return (callback: () => MaybePromise<void>) => {
const catchingCallbackAsync = async () => {
try {