[Logging] Wire in log levels

Wire in log levels to allow specifying as a query string
parameter; defaults to logging only warnings and above,
for WTD-793.
This commit is contained in:
Victor Woeltjen
2015-02-03 18:42:30 -08:00
parent 6dd8a4ccca
commit c0163d2d60
2 changed files with 17 additions and 2 deletions

View File

@ -43,7 +43,6 @@ define(
log[m] = NOOP;
}
});
return log;
}
// Default to 'warn' level if unspecified
@ -67,7 +66,10 @@ define(
configure: function (app, $log) {
decorate($log);
app.config(function ($provide) {
$provide.decorator('$log', decorate);
$provide.decorator('$log', function ($delegate) {
decorate($delegate);
return $delegate;
});
});
}
};