import { Injectable, isDevMode } from '@angular/core'; /** * This service is a placeholder for the actual logger service that needs to log into a database. */ @Injectable() export class LoggerService { private _isDev: boolean = false; constructor() { this._isDev = isDevMode(); } // TODO: Log errors into a database. public error(message: any) { if (!this._isDev) return; console.error(message); } public warn(message: any) { if (!this._isDev) return; console.warn(message); } public info(message: any) { if (!this._isDev) return; console.log(message); } }