mirror of
https://github.com/openMF/web-app.git
synced 2026-02-06 14:11:48 +00:00
WEB-645 fix: replace console.log with Logger service
This commit is contained in:
parent
15cfc6c972
commit
e8d8ac7371
@ -19,6 +19,7 @@ import { CentersService } from 'app/centers/centers.service';
|
||||
import { GroupsService } from 'app/groups/groups.service';
|
||||
import { Dates } from 'app/core/utils/dates';
|
||||
import { CollectionSheetData, JLGGroupData, MeetingFallCenter } from '../models/collection-sheet-data.model';
|
||||
import { Logger } from 'app/core/logger/logger.service';
|
||||
|
||||
@Component({
|
||||
selector: 'mifosx-collection-sheet',
|
||||
@ -30,6 +31,7 @@ import { CollectionSheetData, JLGGroupData, MeetingFallCenter } from '../models/
|
||||
]
|
||||
})
|
||||
export class CollectionSheetComponent implements OnInit {
|
||||
private readonly log = new Logger('CollectionSheetComponent');
|
||||
private formBuilder = inject(UntypedFormBuilder);
|
||||
private centerService = inject(CentersService);
|
||||
private collectionsService = inject(CollectionsService);
|
||||
@ -140,7 +142,7 @@ export class CollectionSheetComponent implements OnInit {
|
||||
this.collectionsService
|
||||
.generateCollectionSheetData(this.meetingFallCenters[0].id, payload)
|
||||
.subscribe((jlgGroupData: JLGGroupData) => {
|
||||
console.log(jlgGroupData);
|
||||
this.log.debug('JLG Group Data:', jlgGroupData);
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
@ -17,11 +17,15 @@ import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
|
||||
|
||||
import { AppModule } from './app/app.module';
|
||||
import { environment } from './environments/environment';
|
||||
import { Logger } from './app/core/logger/logger.service';
|
||||
|
||||
const log = new Logger('Bootstrap');
|
||||
|
||||
if (environment.production) {
|
||||
enableProdMode();
|
||||
Logger.enableProductionMode();
|
||||
}
|
||||
|
||||
platformBrowserDynamic()
|
||||
.bootstrapModule(AppModule)
|
||||
.catch((err) => console.log(err));
|
||||
.catch((err) => log.error('Application bootstrap failed:', err));
|
||||
|
||||
Loading…
Reference in New Issue
Block a user