diff --git a/src/app/logging/logging.service.ts b/src/app/logging/logging.service.ts index 7b9596a..a995939 100644 --- a/src/app/logging/logging.service.ts +++ b/src/app/logging/logging.service.ts @@ -5,4 +5,12 @@ import { NGXLogger } from 'ngx-logger'; export class LoggingService { constructor(private readonly log: NGXLogger) { } + + trace(message?: string, ...additions: unknown[]) { + this.log.trace(message, additions); + } + + debug(message?: string, ...additions: unknown[]) { + this.log.trace(message, additions); + } } \ No newline at end of file diff --git a/src/app/map/map.service.ts b/src/app/map/map.service.ts index f645619..423e82c 100644 --- a/src/app/map/map.service.ts +++ b/src/app/map/map.service.ts @@ -1,6 +1,5 @@ import { ElementRef, EventEmitter, Injectable } from '@angular/core'; import { HttpClient } from '@angular/common/http'; -import { NGXLogger } from 'ngx-logger'; import { CAPITOLS_LAYER, DEFAULT_TRANSITION_DURATION_MS, @@ -18,6 +17,7 @@ import { GeoBoundingBox, TileLayer } from '@deck.gl/geo-layers/typed'; import { environment } from '../../environments/environment'; import { DeckMetrics } from '@deck.gl/core/typed/lib/deck'; import { GeoService } from './geo.service'; +import { LoggingService } from '../logging/logging.service'; @Injectable() export class MapService { @@ -34,7 +34,7 @@ export class MapService { constructor( private readonly http: HttpClient, - private readonly log: NGXLogger, + private readonly log: LoggingService, private readonly geoService: GeoService, private readonly notificationService: NotificationService ) { diff --git a/src/app/notifications/notification.service.ts b/src/app/notifications/notification.service.ts index c643d6b..1fe30b3 100644 --- a/src/app/notifications/notification.service.ts +++ b/src/app/notifications/notification.service.ts @@ -37,10 +37,10 @@ export class NotificationService { } showInfoLocalized(messageKey: string, ...additional: unknown[]) { - this.log.info(messageKey, additional); - - firstValueFrom(this.i18nService.translateMultiple(['notifications.info-title', messageKey])).then(values => - this.toastrService.info(values[1] + ' ' + additional, values[0], options) + firstValueFrom(this.i18nService.translateMultiple(['notifications.info-title', messageKey])).then(values => { + this.log.info(values[1], additional); + this.toastrService.info(values[1] + ' ' + additional, values[0], options); + } ); } }