Skip to content

Instantly share code, notes, and snippets.

View jmdobry's full-sized avatar

Jason Dobry jmdobry

View GitHub Profile
@Wizek
Wizek / logFactory.js
Last active October 11, 2015 20:58
Superpowered logging for AngularJS
// Superpowered logging for AngularJS.
angular.module('logFactory', ['ng'])
.value('logFactory_whiteList', /.*/)
//.value('logFactory_whiteList', /!|.*Ctrl|run/)
.value('logFactory_piercingMethods', {warn:true, error:true})
.factory('logFactory', ['$log', 'logFactory_whiteList' , 'logFactory_piercingMethods', function ($log, whiteList, piercing) {
piercing = piercing || {}