var config  = require("../config.json");

/*****************************************************************************\
    Return a set of functions which we can use to log to console
\*****************************************************************************/
module.exports = function() {
    _error = function(message) {
      console.log(config.logger.message + "ERROR:\t" + message);
    };
    
    _warn = function(message) {
      console.log(config.logger.message + "WARNING:\t" + message);
    };

    _info = function(message) {
      console.log(config.logger.message + "INFO:\t" + message);
    };

    _success = function(message) {
      console.log(config.logger.message + "SUCCESS:\t" + message);
    };

    return {
        error:    _error,
        warn:     _warn,
        info:     _info,
        success:  _success,
    };
}

@@ -39,382 +39,277 @@
 );%0A%0A
-/*****************************************************************************%5C%0A    Return a set of functions which we can use to log to console%0A%5C*****************************************************************************/%0Amodule.exports = function() %7B%0A    _error = function(message) %7B%0A      console.log(config.logger.message + %22ERROR:%5Ct%22 + message);%0A
+(function () %7B%0A    'use strict';%0A%0A    angular%0A        .module('DeezerKids')%0A        .factory('LoggerService', LoggerService);%0A%0A    LoggerService.$inject = %5B'$rootScope'%5D;%0A%0A    function LoggerService($rootScope) %7B%0A        var service = %7B%7D;%0A    
     
-%7D;
 %0A    
-%0A
     
-_warn
+service.Error
  = f
@@ -307,32 +307,33 @@
 Error = function
+ 
 (message) %7B%0A    
@@ -338,58 +338,33 @@
     
-console.log(config.logger.message + %22WARNING:%5Ct%22 +
+      logMessage('Error',
  mes
@@ -374,144 +374,94 @@
 e);%0A
+    
     %7D
-;%0A
 %0A    
-_info = function(message) %7B%0A      console.log(config.logger.message + %22INFO:%5Ct%22 + message);%0A
+    %0A        return service;%0A    
     
-%7D;%0A
 %0A    
-_success = function(
+    function logMessage(type, 
 mess
@@ -463,24 +463,30 @@
  message) %7B%0A
+      
       consol
@@ -519,16 +519,16 @@
 e + 
-%22SUCCESS
+type + %22
 :%5Ct%22
@@ -548,134 +548,31 @@
     
-%7D;%0A%0A    return %7B%0A        error:    _error,%0A        warn:     _warn,%0A        info:     _info,%0A        success:  _success,%0A    %7D;%0A%7D
+    %7D        %0A    %7D%0A%0A%7D)();
 %0A

Update logger.service.js