Remove extra spaces in front of logger tags

This commit is contained in:
Asher 2019-01-22 12:52:24 -06:00 committed by Kyle Carberry
parent a33d69232a
commit 86c1c9993e
No known key found for this signature in database
GPG Key ID: A0409BDB6B0B3EDB
2 changed files with 2 additions and 4 deletions

View File

@ -211,7 +211,7 @@ export class ServerFormatter extends Formatter {
name += " "; name += " ";
} }
this.format += "\u001B[1m"; this.format += "\u001B[1m";
this.format += `\u001B[38;2;${r};${g};${b}m ${name} \u001B[0m`; this.format += `\u001B[38;2;${r};${g};${b}m${name} \u001B[0m`;
} }
public push(arg: any, color?: string, weight?: string): void { // tslint:disable-line no-any public push(arg: any, color?: string, weight?: string): void { // tslint:disable-line no-any
@ -373,7 +373,6 @@ export class Logger {
// field2 (type)?: value // field2 (type)?: value
this._formatter.tag(options.type.toUpperCase(), options.tagColor); this._formatter.tag(options.type.toUpperCase(), options.tagColor);
if (this.name && this.nameColor) { if (this.name && this.nameColor) {
this._formatter.push(" ");
this._formatter.tag(this.name.toUpperCase(), this.nameColor); this._formatter.tag(this.name.toUpperCase(), this.nameColor);
} }
this._formatter.push(options.message); this._formatter.push(options.message);

View File

@ -122,7 +122,6 @@ export interface Socket {
emit(event: "end"): boolean; emit(event: "end"): boolean;
} }
export class ServerSocket extends events.EventEmitter implements Socket { export class ServerSocket extends events.EventEmitter implements Socket {
public writable: boolean = true; public writable: boolean = true;
@ -214,4 +213,4 @@ export class ServerSocket extends events.EventEmitter implements Socket {
public setDefaultEncoding(encoding: string): this { public setDefaultEncoding(encoding: string): this {
throw new Error("Method not implemented."); throw new Error("Method not implemented.");
} }
} }