Skip to content

Latest commit

 

History

History
27 lines (23 loc) · 1.04 KB

README.md

File metadata and controls

27 lines (23 loc) · 1.04 KB

angular-log-extender

Build Status Coverage Status

  • log to server
  • error levels
  • providers

Configuration:

angular
    .module('YourModule')
    .config(function (logExtenderProvider, ApiServerHostProvider) {
        logExtenderProvider.setLevel(logExtenderProvider.levels.warn);
        logExtenderProvider.setAppender({
            appenderType: logExtenderProvider.appenderTypes.http,
            urlBatch: ApiServerHostProvider.$get() + 'log/batch',
            storage: 'localStorageService'
        });
    })
    .run(function (logExtender) {
        if (logExtender.storageAvailability()) {
            logExtender.appender.sendStorageData();
        }
    });