AngularJS sample about how to replace $log implementation