Skip to content

Instantly share code, notes, and snippets.

@wKoza
Last active December 25, 2016 11:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save wKoza/a71278facce866f68e4bf02c6cd2ea10 to your computer and use it in GitHub Desktop.
Save wKoza/a71278facce866f68e4bf02c6cd2ea10 to your computer and use it in GitHub Desktop.
import { Component, OnInit } from '@angular/core';
import { LoggerService } from "./logger.service";
@Component({
selector: 'app-component2',
template: '<app-component3></app-component3>'
})
export class Component2 implements OnInit {
constructor(private logger:LoggerService) { }
ngOnInit() {
this.logger.level=1; //On change le niveau de log en 'info'
this.logger.info(this.logger.level.toString());
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment