Open ferronrsmith opened 9 years ago
app.config(['logExProvider', function(logExProvider) {
// ignores messages starting with an 's' and ending with a 'e'
logExProvider.disallow("^s.+e$");
}]);
$log.log('something confidential, ignore please');
// >> Dec-08-2013-1:00:47PM >> ['filtered']
we can build an ajax hook, that will allow persons to persist data on their back-end
app.config(['logExProvider', function(logExProvider) {
// ignores messages starting with an 's' and ending with a 'e'
logExProvider.persist({
batchSize: 3, // send at intervals to reduce xhr req.
interleave : 1000, // instead of using the batchSize an interleave value can be used to determine when messages should be pushed. Increase the value to reduce xhr req
executor : function (logs) {...},
adapter : {
enable : false,
maxMessages : 15
}
});
}]);
simple queuing mechanism for keeping track of logs. also include and adapter that if localStorage
extension is present it will allow persistence of the logs up to a persistence limit set. the default would be the last 15
@lwhiteley feature that you think we be useful and that we should add to the logger.