Fix colors

This commit is contained in:
danbulant 2019-09-28 15:09:04 +02:00
parent aed942e86c
commit e75c642620

View file

@ -9,7 +9,14 @@ class sql2csv {
console.log(this.options.prefix + str);
}
}
colorLog(str, color){
if(!this.options.logging) return;
if(this.options.colors){
console.log(this.options.prefix + color + str + "\x1b[0m");
} else {
console.log(this.options.prefix + str);
}
}
warn(str){
if(!this.options.logging) return;
if(this.options.colors){
@ -42,7 +49,7 @@ class sql2csv {
} else {
this.warn("Mysql driver check skipped");
}
this.log("\x1b[32mInitialized");
this.colorLog("Initialized", "\x1b[32m");
}
//update certain option