mirror of
				https://git.hibas.dev/OpenServer/NodeLogging.git
				synced 2025-10-31 21:40:45 +00:00 
			
		
		
		
	Removing conole Color symbols in Logfiles
This commit is contained in:
		| @ -1,6 +1,6 @@ | ||||
| { | ||||
|    "name": "logger-perfcloud", | ||||
|    "version": "1.0.8", | ||||
|    "version": "1.0.9", | ||||
|    "description": "", | ||||
|    "main": "out/index.js", | ||||
|    "types": "out/index.d.ts", | ||||
|  | ||||
| @ -114,6 +114,14 @@ export class Logging { | ||||
|       } | ||||
|  | ||||
|       var m = "[" + LoggingTypes[type] + "][" + _getCallerFile() + "][" + new Date().toISOString().replace(/T/, ' ').replace(/\..+/, '') + "]: " + mb; | ||||
|       if (this.stdout) console.log(consoleLogFormat + m + Reset); | ||||
|  | ||||
|       let index = m.indexOf("\x1b"); | ||||
|       while (index >= 0) { | ||||
|          m = m.substring(0, index) + m.substring(index + 4, m.length); | ||||
|          index = m.indexOf("\x1b"); | ||||
|       } | ||||
|  | ||||
|       if (this.logFileLocation) { | ||||
|          if (!this.fileStream || !this.errorStream) { | ||||
|             await Logging.initializeFile(); | ||||
| @ -121,7 +129,6 @@ export class Logging { | ||||
|          Logging.writeMessageToFile(m, type === LoggingTypes.Error); | ||||
|       } | ||||
|       Logging.events.emit("message", { type: type, message: mb }); | ||||
|       if (this.stdout) console.log(consoleLogFormat + m + Reset); | ||||
|    } | ||||
|  | ||||
|    private static writeMessageToFile(message: string, error?: boolean) { | ||||
|  | ||||
		Reference in New Issue
	
	Block a user