| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 | 1× 5× 1× 1× 1× 1× 1× | // A wrapper service for original $log
class LoggerService {
constructor ($log) {
Object.assign(this, {$log});
}
error (message, data) {
this.$log.error(`Error: ${message}, ${data}`);
}
info (message, data) {
this.$log.info(`Info: ${message}, ${data}`);
}
debug (message, data) {
this.$log.debug(`Debug: ${message}, ${data}`);
}
warning (message, data) {
this.$log.warn(`Warning: ${message}, ${data}`);
}
}
LoggerService.$inject = ['$log'];
export default LoggerService;
|