diff --git a/src/app/child-dev-project/attendance/add-day-attendance/roll-call/roll-call.component.spec.ts b/src/app/child-dev-project/attendance/add-day-attendance/roll-call/roll-call.component.spec.ts index 6b2878b523..d14996e52b 100644 --- a/src/app/child-dev-project/attendance/add-day-attendance/roll-call/roll-call.component.spec.ts +++ b/src/app/child-dev-project/attendance/add-day-attendance/roll-call/roll-call.component.spec.ts @@ -51,7 +51,7 @@ describe("RollCallComponent", () => { participant2 = new Child("child2"); participant3 = new Child("child3"); - mockLoggingService = jasmine.createSpyObj(["warn"]); + mockLoggingService = jasmine.createSpyObj(["warn", "debug"]); TestBed.configureTestingModule({ imports: [ @@ -107,7 +107,7 @@ describe("RollCallComponent", () => { expect(component.children).toEqual([participant1]); expect(component.eventEntity.children).not.toContain(nonExistingChildId); - expect(mockLoggingService.warn).toHaveBeenCalled(); + expect(mockLoggingService.debug).toHaveBeenCalled(); flush(); })); diff --git a/src/app/child-dev-project/attendance/add-day-attendance/roll-call/roll-call.component.ts b/src/app/child-dev-project/attendance/add-day-attendance/roll-call/roll-call.component.ts index 4100eaf235..9d295c5eb2 100644 --- a/src/app/child-dev-project/attendance/add-day-attendance/roll-call/roll-call.component.ts +++ b/src/app/child-dev-project/attendance/add-day-attendance/roll-call/roll-call.component.ts @@ -176,7 +176,7 @@ export class RollCallComponent implements OnChanges { try { child = await this.entityMapper.load(Child, childId); } catch (e) { - this.loggingService.warn( + this.loggingService.debug( "Could not find child " + childId + " for event " + diff --git a/src/app/core/config/dynamic-routing/not-found/not-found.component.spec.ts b/src/app/core/config/dynamic-routing/not-found/not-found.component.spec.ts index 49b62a4d6b..135941522d 100644 --- a/src/app/core/config/dynamic-routing/not-found/not-found.component.spec.ts +++ b/src/app/core/config/dynamic-routing/not-found/not-found.component.spec.ts @@ -11,7 +11,7 @@ describe("NotFoundComponent", () => { let mockLogging: jasmine.SpyObj; beforeEach(async () => { - mockLogging = jasmine.createSpyObj(LoggingService.name, ["warn"]); + mockLogging = jasmine.createSpyObj(LoggingService.name, ["debug"]); await TestBed.configureTestingModule({ imports: [NotFoundComponent, RouterTestingModule], providers: [ @@ -32,8 +32,8 @@ describe("NotFoundComponent", () => { }); it("should call logging service with current route", () => { - expect(mockLogging.warn).toHaveBeenCalledWith( - "Could not find component for route: /some/path", + expect(mockLogging.debug).toHaveBeenCalledWith( + "Could not find route: /some/path", ); }); }); diff --git a/src/app/core/config/dynamic-routing/not-found/not-found.component.ts b/src/app/core/config/dynamic-routing/not-found/not-found.component.ts index 3cf6987ac6..e83ad0db73 100644 --- a/src/app/core/config/dynamic-routing/not-found/not-found.component.ts +++ b/src/app/core/config/dynamic-routing/not-found/not-found.component.ts @@ -18,8 +18,10 @@ export class NotFoundComponent implements OnInit { ) {} ngOnInit() { - this.loggingService.warn( - "Could not find component for route: " + this.location.pathname, - ); + if (!this.location.pathname.endsWith("/404")) { + this.loggingService.debug( + "Could not find route: " + this.location.pathname, + ); + } } }