fix(core): update
This commit is contained in:
		| @@ -42,6 +42,7 @@ tap.test('should create a log group', async () => { | |||||||
|  |  | ||||||
| tap.test('should catch error', async () => { | tap.test('should catch error', async () => { | ||||||
|   console.error(new Error('hey')); |   console.error(new Error('hey')); | ||||||
|  |   // throw new Error('hey'); | ||||||
| }); | }); | ||||||
|  |  | ||||||
| tap.start(); | tap.start(); | ||||||
|   | |||||||
| @@ -42,8 +42,15 @@ export class Smartlog implements plugins.smartlogInterfaces.ILogDestination { | |||||||
|         flags: 'a+' |         flags: 'a+' | ||||||
|       }); */ |       }); */ | ||||||
|       process.stdout.write = (...args) => { |       process.stdout.write = (...args) => { | ||||||
|         if (!args[0].startsWith('LOG')) { |         const logString = args[0]; | ||||||
|           this.log('info', args[0]); |         if (!logString.startsWith('LOG')) { | ||||||
|  |           switch(true) { | ||||||
|  |             case logString.startsWith('Error:'): | ||||||
|  |               this.log('error', logString); | ||||||
|  |               break; | ||||||
|  |             default: | ||||||
|  |               this.log('info', logString); | ||||||
|  |           } | ||||||
|           return; |           return; | ||||||
|         } |         } | ||||||
|         // fileStream.write(args[0]); |         // fileStream.write(args[0]); | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user