mirror of
https://github.com/taobataoma/meanTorrent.git
synced 2026-06-19 19:10:36 +02:00
opt(debug): optimization debug console print methods
This commit is contained in:
@@ -35,7 +35,7 @@ module.exports.debug = function (obj) {
|
||||
module.exports.debugGreen = function (obj) {
|
||||
if (appConfig.showDebugLog) {
|
||||
console.log(chalk.green('[' + moment().format('YYYY-MM-DD HH:mm:ss') + ']'));
|
||||
console.log(chalk.green(obj));
|
||||
console.log(obj);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -46,7 +46,7 @@ module.exports.debugGreen = function (obj) {
|
||||
module.exports.debugRed = function (obj) {
|
||||
if (appConfig.showDebugLog) {
|
||||
console.log(chalk.red('[' + moment().format('YYYY-MM-DD HH:mm:ss') + ']'));
|
||||
console.log(chalk.red(obj));
|
||||
console.log(obj);
|
||||
}
|
||||
};
|
||||
module.exports.debugError = function (obj) {
|
||||
@@ -60,7 +60,7 @@ module.exports.debugError = function (obj) {
|
||||
module.exports.debugBlue = function (obj) {
|
||||
if (appConfig.showDebugLog) {
|
||||
console.log(chalk.blue('[' + moment().format('YYYY-MM-DD HH:mm:ss') + ']'));
|
||||
console.log(chalk.blue(obj));
|
||||
console.log(obj);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -71,7 +71,7 @@ module.exports.debugBlue = function (obj) {
|
||||
module.exports.debugYellow = function (obj) {
|
||||
if (appConfig.showDebugLog) {
|
||||
console.log(chalk.yellow('[' + moment().format('YYYY-MM-DD HH:mm:ss') + ']'));
|
||||
console.log(chalk.yellow(obj));
|
||||
console.log(obj);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user