File

src/app/services/log.service.ts

Index

Properties

Properties

debug
debug: function
Type : function
error
error: function
Type : function
info
info: function
Type : function
log
log: function
Type : function
warn
warn: function
Type : function
import { Injectable } from '@angular/core';

interface ILog {
  info: (msg: any) => void;
  debug: (msg: any) => void;
  log: (msg: any) => void;
  warn: (msg: any) => void;
  error: (msg: any) => void;
}

@Injectable()
export class LogService implements ILog {
  info(msg: any) {
  console.info(msg); // info severity;
  }
  debug(msg: any) {
   console.debug(msg); // debug severity;
  }
  warn(msg: any) {
   console.warn(msg); // warn severity;
  }
  error(msg: any) {
  console.error(msg); // error severity;
  }
  log(message: string | any) {
    console.log(message); // log severity
  }
}

results matching ""

    No results matching ""