Compare commits

...

4 Commits

Author SHA1 Message Date
47583bd955 2.0.33 2020-06-11 13:50:36 +00:00
018bc7054a fix(core): update 2020-06-11 13:50:35 +00:00
5ca4cb9964 2.0.32 2020-06-11 13:23:08 +00:00
27bb9a789c fix(core): update 2020-06-11 13:23:07 +00:00
4 changed files with 12 additions and 3 deletions

2
package-lock.json generated
View File

@ -1,6 +1,6 @@
{ {
"name": "@pushrocks/smartlog", "name": "@pushrocks/smartlog",
"version": "2.0.31", "version": "2.0.33",
"lockfileVersion": 1, "lockfileVersion": 1,
"requires": true, "requires": true,
"dependencies": { "dependencies": {

View File

@ -1,6 +1,6 @@
{ {
"name": "@pushrocks/smartlog", "name": "@pushrocks/smartlog",
"version": "2.0.31", "version": "2.0.33",
"private": false, "private": false,
"description": "minimalistic distributed and extensible logging tool", "description": "minimalistic distributed and extensible logging tool",
"keywords": [ "keywords": [

View File

@ -40,4 +40,8 @@ tap.test('should create a log group', async () => {
logGroup.log('info', 'this is logged from a log group'); logGroup.log('info', 'this is logged from a log group');
}); });
tap.test('should catch error', async () => {
console.error(new Error('hey'));
});
tap.start(); tap.start();

View File

@ -4,7 +4,12 @@ import * as plugins from './smartlog.plugins';
* a console log optimized for smartlog * a console log optimized for smartlog
*/ */
export class ConsoleLog { export class ConsoleLog {
public log(logLevelArg: plugins.smartlogInterfaces.TLogLevel, logMessageArg: string) { public log(
logLevelArg: plugins.smartlogInterfaces.TLogLevel,
logMessageArg: string,
dataArg?: any,
correlationArg?: plugins.smartlogInterfaces.ILogCorrelation
) {
console.log(`__# ${logLevelArg}: ${logMessageArg}`); console.log(`__# ${logLevelArg}: ${logMessageArg}`);
} }
} }