2016-05-19 17:27:09 +00:00
|
|
|
"use strict";
|
2016-05-23 07:10:30 +00:00
|
|
|
require("typings-global");
|
2016-05-19 17:27:09 +00:00
|
|
|
var beautylog_classes_ora_1 = require("./beautylog.classes.ora");
|
|
|
|
var nativeLog = console.log;
|
|
|
|
/**
|
|
|
|
* routes the console to got through beautylog, so beautylog can take action before things are logged to console.
|
|
|
|
*/
|
2016-05-19 17:45:31 +00:00
|
|
|
var route = function (statusArg) {
|
2016-05-19 17:27:09 +00:00
|
|
|
if (statusArg == true) {
|
|
|
|
console.log = exports.beautyConsole.log;
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
console.log = nativeLog;
|
|
|
|
}
|
|
|
|
};
|
|
|
|
exports.beautyConsole = {
|
|
|
|
log2: nativeLog,
|
|
|
|
log: function (logArg) {
|
|
|
|
if (beautylog_classes_ora_1.oraActive) {
|
|
|
|
beautylog_classes_ora_1.activeOra.pause();
|
|
|
|
nativeLog.apply(nativeLog, arguments);
|
|
|
|
beautylog_classes_ora_1.activeOra.start();
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
nativeLog.apply(nativeLog, arguments);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
};
|
2016-05-19 17:45:31 +00:00
|
|
|
route(true);
|
2016-07-01 04:17:12 +00:00
|
|
|
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYmVhdXR5bG9nLmNvbnNvbGUuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi90cy9iZWF1dHlsb2cuY29uc29sZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiO0FBQUEsUUFBTyxnQkFBZ0IsQ0FBQyxDQUFBO0FBRXhCLHNDQUFrQyx5QkFBeUIsQ0FBQyxDQUFBO0FBQzVELElBQUksU0FBUyxHQUFHLE9BQU8sQ0FBQyxHQUFHLENBQUM7QUFFNUI7O0dBRUc7QUFDSCxJQUFJLEtBQUssR0FBRyxVQUFTLF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