fix(core): update
This commit is contained in:
		
							
								
								
									
										566
									
								
								package-lock.json
									
									
									
										generated
									
									
									
								
							
							
						
						
									
										566
									
								
								package-lock.json
									
									
									
										generated
									
									
									
								
							
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							| @@ -17,7 +17,7 @@ | ||||
|   "license": "MIT", | ||||
|   "scripts": { | ||||
|     "test": "(tstest test/)", | ||||
|     "build": "(tsbuild --web)", | ||||
|     "build": "(tsbuild --web && tsbundle npm)", | ||||
|     "format": "(gitzone format)" | ||||
|   }, | ||||
|   "devDependencies": { | ||||
| @@ -30,8 +30,9 @@ | ||||
|     "tslint-config-prettier": "^1.18.0" | ||||
|   }, | ||||
|   "dependencies": { | ||||
|     "@gitzone/tsbundle": "^1.0.69", | ||||
|     "@pushrocks/isounique": "^1.0.4", | ||||
|     "@pushrocks/smartlog-interfaces": "^2.0.15" | ||||
|     "@pushrocks/smartlog-interfaces": "^2.0.18" | ||||
|   }, | ||||
|   "files": [ | ||||
|     "ts/**/*", | ||||
|   | ||||
							
								
								
									
										14
									
								
								ts/index.ts
									
									
									
									
									
								
							
							
						
						
									
										14
									
								
								ts/index.ts
									
									
									
									
									
								
							| @@ -1,16 +1,4 @@ | ||||
| import * as plugins from './smartlog.plugins'; | ||||
| import { Smartlog } from './smartlog.classes.smartlog'; | ||||
| const defaultLogger: Smartlog = new Smartlog({ | ||||
|   logContext: { | ||||
|     company: 'undefined', | ||||
|     companyunit: 'undefefined', | ||||
|     containerName: 'undefined', | ||||
|     environment: 'local', | ||||
|     runtime: 'node', | ||||
|     zone: 'undefined' | ||||
|   } | ||||
| }); | ||||
|  | ||||
| defaultLogger.enableConsole(); | ||||
|  | ||||
| export { Smartlog, defaultLogger }; | ||||
| export { Smartlog }; | ||||
|   | ||||
							
								
								
									
										3
									
								
								ts/smartlog.classes.loggroup.ts
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										3
									
								
								ts/smartlog.classes.loggroup.ts
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,3 @@ | ||||
| import * as plugins from './smartlog.plugins'; | ||||
|  | ||||
| export class LogGroup {} | ||||
| @@ -11,6 +11,8 @@ export class Smartlog implements plugins.smartlogInterfaces.ILogDestination { | ||||
|   private logContext: plugins.smartlogInterfaces.ILogContext; | ||||
|   private minimumLogLevel: plugins.smartlogInterfaces.TLogLevel; | ||||
|  | ||||
|   private uniInstanceId: string = plugins.isounique.uni(); | ||||
|  | ||||
|   private consoleEnabled: boolean; | ||||
|  | ||||
|   private logRouter = new LogRouter(); | ||||
| @@ -65,14 +67,21 @@ export class Smartlog implements plugins.smartlogInterfaces.ILogDestination { | ||||
|     logLevelArg: plugins.smartlogInterfaces.TLogLevel, | ||||
|     logMessageArg: string, | ||||
|     logDataArg?: any, | ||||
|     correlationArg: plugins.smartlogInterfaces.ILogCorrelation = { | ||||
|       id: plugins.isounique.uni(), | ||||
|       type: 'none' | ||||
|     } | ||||
|     correlationArg?: plugins.smartlogInterfaces.ILogCorrelation | ||||
|   ) { | ||||
|     correlationArg = { | ||||
|       ...{ | ||||
|         id: plugins.isounique.uni(), | ||||
|         type: 'none', | ||||
|         instance: this.uniInstanceId | ||||
|       }, | ||||
|       ...correlationArg | ||||
|     }; | ||||
|  | ||||
|     if (this.consoleEnabled) { | ||||
|       this.safeConsoleLog(`${logLevelArg}: ${logMessageArg}`); | ||||
|     } | ||||
|  | ||||
|     const logPackage: plugins.smartlogInterfaces.ILogPackage = { | ||||
|       timestamp: Date.now(), | ||||
|       type: 'log', | ||||
|   | ||||
		Reference in New Issue
	
	Block a user