0.0.1 • Published 5 years ago
logiod v0.0.1
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){
//
}