import { Injectable } from '@angular/core' ; import log from 'electron-log' ; @ Injectable ( { providedIn : 'root' } ) export class Logger { constructor ( ) { } public info ( message , callerClass , callerMethod ) { log . info ( this . formattedMessage ( message , callerClass , callerMethod ) ) ; } public warn ( message , callerClass , callerMethod ) { log . warn ( this . formattedMessage ( message , callerClass , callerMethod ) ) ; } public error ( message , callerClass , callerMethod ) { log . error ( this . formattedMessage ( message , callerClass , callerMethod ) ) ; } private formattedMessage ( message , callerClass , callerMethod ) { return `[${ callerClass }] [${ callerMethod }] ${ message }` ; } }