108 lines
14 KiB
JavaScript
108 lines
14 KiB
JavaScript
"use strict";
|
|
require("typings-global");
|
|
var plugins = require("./beautylog.plugins");
|
|
var beautylog_console_1 = require("./beautylog.console");
|
|
var localBl = {
|
|
dirPrefix: plugins.clc.bgXterm(39).xterm(231).bold(' DIR ') + ' ',
|
|
errorPrefix: ' Error: '.bgRed.white.bold + ' ',
|
|
infoPrefix: plugins.clc.bgXterm(198).xterm(231).bold(' INFO ') + ' ',
|
|
normalPrefix: ' Log: '.bgCyan.white.bold + ' ',
|
|
okPrefix: ' '.bgGreen + ' OK! '.bgBlack.green.bold + ' ',
|
|
successPrefix: ' Success: '.bgGreen.white.bold + ' ',
|
|
warnPrefix: ' '.bgYellow + ' Warn: '.bgBlack.yellow.bold + ' '
|
|
};
|
|
/**
|
|
*
|
|
* @param logText
|
|
* @param logType
|
|
* @returns {boolean}
|
|
*/
|
|
exports.log = function (logText, logType) {
|
|
if (logText === void 0) { logText = 'empty log'; }
|
|
if (logType === void 0) { logType = 'normal'; }
|
|
switch (plugins.smartenv.getEnv().runtimeEnv) {
|
|
case "node":
|
|
exports.logNode(logText, logType);
|
|
break;
|
|
case "browser":
|
|
logBrowser(logText, logType);
|
|
break;
|
|
default:
|
|
console.log("something is strange about the platform in which you try to use beautylog");
|
|
break;
|
|
}
|
|
};
|
|
exports.logNode = function (logText, logType) {
|
|
try {
|
|
switch (logType) {
|
|
case 'dir':
|
|
logText = localBl.dirPrefix + plugins.clc.xterm(26)(logText);
|
|
break;
|
|
case 'error':
|
|
logText = localBl.errorPrefix + logText.red.bold;
|
|
break;
|
|
case 'info':
|
|
logText = localBl.infoPrefix + plugins.clc.xterm(198)(logText);
|
|
break;
|
|
case 'normal':
|
|
logText = localBl.normalPrefix + logText.cyan.bold;
|
|
break;
|
|
case 'ok':
|
|
logText = localBl.okPrefix + logText.bold;
|
|
break;
|
|
case 'success':
|
|
logText = localBl.successPrefix + logText.green.bold;
|
|
break;
|
|
case 'warn':
|
|
logText = localBl.warnPrefix + logText.bold;
|
|
break;
|
|
case 'log':
|
|
logText = localBl.normalPrefix + logText.blue.bold;
|
|
break;
|
|
default:
|
|
logText.blue.bold;
|
|
console.log(('unknown logType for "' + logText + '"').red.bold);
|
|
break;
|
|
}
|
|
beautylog_console_1.beautyConsole.log(logText);
|
|
return true;
|
|
}
|
|
catch (error) {
|
|
console.log(localBl.errorPrefix + 'You seem to have tried logging something strange'.red.bold + error);
|
|
return false;
|
|
}
|
|
};
|
|
var logBrowser = function (logText, logType) {
|
|
switch (logType) {
|
|
case 'dir':
|
|
logText = localBl.dirPrefix + plugins.clc.xterm(26)(logText);
|
|
break;
|
|
case 'error':
|
|
logText = localBl.errorPrefix + logText.red.bold;
|
|
break;
|
|
case 'info':
|
|
console.log('%c Info: %c ' + logText, 'background:#EC407A;color:#ffffff;', 'color:#EC407A;');
|
|
break;
|
|
case 'normal':
|
|
logText = localBl.normalPrefix + logText.cyan.bold;
|
|
break;
|
|
case 'ok':
|
|
console.log('%c OK: %c ' + logText, "background:#000000;color:#8BC34A;", "color:#000000;");
|
|
break;
|
|
case 'success':
|
|
console.log('%c Success: %c ' + logText, "background:#8BC34A;color:#ffffff;", "color:#8BC34A;");
|
|
break;
|
|
case 'warn':
|
|
console.log('%c Warn: %c ' + logText, "background:#000000;color:#FB8C00;", "color:#000000;");
|
|
break;
|
|
case 'log':
|
|
console.log('%c Log: %c ' + logText, "background:#42A5F5;color:#ffffff", "color:#42A5F5;");
|
|
break;
|
|
default:
|
|
console.log('unknown logType for "' + logText + '"');
|
|
break;
|
|
}
|
|
};
|
|
|
|
//# sourceMappingURL=data:application/json;charset=utf8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImJlYXV0eWxvZy5sb2cuaGVscGVycy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiO0FBQUEsUUFBTyxnQkFBZ0IsQ0FBQyxDQUFBO0FBRXhCLElBQVksT0FBTyxXQUFNLHFCQUFxQixDQUFDLENBQUE7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nKXtcclxuICAgIHRyeSB7XHJcbiAgICAgICAgc3dpdGNoIChsb2dUeXBlKSB7XHJcbiAgICAgICAgICAgIGNhc2UgJ2Rpcic6XHJcbiAgICAgICAgICAgICAgICBsb2dUZXh0ID0gbG9jYWxCbC5kaXJQcmVmaXggKyBwbHVnaW5zLmNsYy54dGVybSgyNikobG9nVGV4dCk7XHJcbiAgICAgICAgICAgICAgICBicmVhaztcclxuICAgICAgICAgICAgY2FzZSAnZXJyb3InOlxyXG4gICAgICAgICAgICAgICAgbG9nVGV4dCA9IGxvY2FsQmwuZXJyb3JQcmVmaXggKyBsb2dUZXh0LnJlZC5ib2xkO1xyXG4gICAgICAgICAgICAgICAgYnJlYWs7XHJcbiAgICAgICAgICAgIGNhc2UgJ2luZm8nOlxyXG4gICAgICAgICAgICAgICAgbG9nVGV4dCA9IGxvY2FsQmwuaW5mb1ByZWZpeCArIHBsdWdpbnMuY2xjLnh0ZXJtKDE5OCkobG9nVGV4dCk7XHJcbiAgICAgICAgICAgICAgICBicmVhaztcclxuICAgICAgICAgICAgY2FzZSAnbm9ybWFsJzpcclxuICAgICAgICAgICAgICAgIGxvZ1RleHQgPSBsb2NhbEJsLm5vcm1hbFByZWZpeCArIGxvZ1RleHQuY3lhbi5ib2xkO1xyXG4gICAgICAgICAgICAgICAgYnJlYWs7XHJcbiAgICAgICAgICAgIGNhc2UgJ29rJzpcclxuICAgICAgICAgICAgICAgIGxvZ1RleHQgPSBsb2NhbEJsLm9rUHJlZml4ICsgbG9nVGV4dC5ib2xkO1xyXG4gICAgICAgICAgICAgICAgYnJlYWs7XHJcbiAgICAgICAgICAgIGNhc2UgJ3N1Y2Nlc3MnOlxyXG4gICAgICAgICAgICAgICAgbG9nVGV4dCA9IGxvY2FsQmwuc3VjY2Vzc1ByZWZpeCArIGxvZ1RleHQuZ3JlZW4uYm9sZDtcclxuICAgICAgICAgICAgICAgIGJyZWFrO1xyXG4gICAgICAgICAgICBjYXNlICd3YXJuJzpcclxuICAgICA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AgICBicmVhaztcclxuICAgICAgICAgICAgY2FzZSAnZXJyb3InOlxyXG4gICAgICAgICAgICAgICAgbG9nVGV4dCA9IGxvY2FsQmwuZXJyb3JQcmVmaXggKyBsb2dUZXh0LnJlZC5ib2xkO1xyXG4gICAgICAgICAgICAgICAgYnJlYWs7XHJcbiAgICAgICAgICAgIGNhc2UgJ2luZm8nOlxyXG4gICAgICAgICAgICAgICAgY29uc29sZS5sb2coJyVjIEluZm86ICVjICcgKyBsb2dUZXh0LCdiYWNrZ3JvdW5kOiNFQzQwN0E7Y29sb3I6I2ZmZmZmZjsnLCdjb2xvcjojRUM0MDdBOycpO1xyXG4gICAgICAgICAgICAgICAgYnJlYWs7XHJcbiAgICAgICAgICAgIGNhc2UgJ25vcm1hbCc6XHJcbiAgICAgICAgICAgICAgICBsb2dUZXh0ID0gbG9jYWxCbC5ub3JtYWxQcmVmaXggKyBsb2dUZXh0LmN5YW4uYm9sZDtcclxuICAgICAgICAgICAgICAgIGJyZWFrO1xyXG4gICAgICAgICAgICBjYXNlICdvayc6XHJcbiAgICAgICAgICAgICAgICBjb25zb2xlLmxvZygnJWMgT0s6ICVjICcgKyBsb2dUZXh0LFwiYmFja2dyb3VuZDojMDAwMDAwO2NvbG9yOiM4QkMzNEE7XCIsXCJjb2xvcjojMDAwMDAwO1wiKTtcclxuICAgICAgICAgICAgICAgIGJyZWFrO1xyXG4gICAgICAgICAgICBjYXNlICdzdWNjZXNzJzpcclxuICAgICAgICAgICAgICAgIGNvbnNvbGUubG9nKCclYyBTdWNjZXNzOiAlYyAnICsgbG9nVGV4dCxcImJhY2tncm91bmQ6IzhCQzM0QTtjb2xvcjojZmZmZmZmO1wiLFwiY29sb3I6IzhCQzM0QTtcIik7XHJcbiAgICAgICAgICAgICAgICBicmVhaztcclxuICAgICAgICAgICAgY2FzZSAnd2Fybic6XHJcbiAgICAgICAgICAgICAgICBjb25zb2xlLmxvZygnJWMgV2FybjogJWMgJyArIGxvZ1RleHQsXCJiYWNrZ3JvdW5kOiMwMDAwMDA7Y29sb3I6I0ZCOEMwMDtcIixcImNvbG9yOiMwMDAwMDA7XCIpO1xyXG4gICAgICAgICAgICAgICAgYnJlYWs7XHJcbiAgICAgICAgICAgIGNhc2UgJ2xvZyc6XHJcbiAgICAgICAgICAgICAgICBjb25zb2xlLmxvZygnJWMgTG9nOiAlYyAnICsgbG9nVGV4dCxcImJhY2tncm91bmQ6IzQyQTVGNTtjb2xvcjojZmZmZmZmXCIsXCJjb2xvcjojNDJBNUY1O1wiKTtcclxuICAgICAgICAgICAgICAgIGJyZWFrO1xyXG4gICAgICAgICAgICBkZWZhdWx0OlxyXG4gICAgICAgICAgICAgICAgY29uc29sZS5sb2coJ3Vua25vd24gbG9nVHlwZSBmb3IgXCInICsgbG9nVGV4dCArICdcIicpO1xyXG4gICAgICAgICAgICAgICAgYnJlYWs7XHJcbiAgICAgICAgfVxyXG59OyJdfQ==
|