Skip to content

09. Toggle between the default log prefix rules and your custom rules

lwhiteley edited this page Sep 22, 2014 · 4 revisions

If you want to quickly toggle between using your custom log pefix rules and the default rules, te following example shows you how

app.config(['logExProvider', function(logExProvider) {
    // this forces log-ex to use the default rules
    // passing true as a parameter does the same thing. 
    // eg logExProvider.useDefaultLogPrefix(true);
    logExProvider.useDefaultLogPrefix();
}]);
app.config(['logExProvider', function(logExProvider) {
    //this tells log-ex to use the custom rules (if set)
    logExProvider.useDefaultLogPrefix(false); 
}]);