0.0.1 • Published 4 years ago

logiod v0.0.1

Weekly downloads
1
License
ISC
Repository
github
Last release
4 years ago

logoid

Import

import {Logoid, LogoidOption, BroadcastRestApiOption,
     BroadcastIndexedDbOption, LogLevel, HttpRequest} from './index';

Install Logoid

const log = new Logoid();
log.installBroadcasts({
    broadCastRestApi: {
        httpRequest: {
            url: 'http://localhost:4200/api',
            method: 'POST'
        },
        watch: [LogLevel.ERROR]
    },
    broadcastIndexedDb: {
        watch: [LogLevel.INFO, LogLevel.ERROR]
    }
})

Console Log

log.log('welcome to logoid');
try{
    log.error('error message', new Error('custom error'));
} catch(e){
    //
}