Start integration of loggly
This commit is contained in:
parent
67d6dc2601
commit
80cf15c234
26
README.md
26
README.md
@ -73,6 +73,32 @@ myTable.print(); //prints myTable to console
|
|||||||
The table from the code with type "checks" above looks like this:
|
The table from the code with type "checks" above looks like this:
|
||||||
![table.png](https://mediaserve.lossless.digital/github.com/pushrocks/beautylog/table.png)
|
![table.png](https://mediaserve.lossless.digital/github.com/pushrocks/beautylog/table.png)
|
||||||
|
|
||||||
|
## Centralized remote logging
|
||||||
|
Beautilog makes it easy to have all your node applications log to a remote location.
|
||||||
|
|
||||||
|
Currently supported remote providers:
|
||||||
|
|
||||||
|
* loggly.com
|
||||||
|
|
||||||
|
```typescript
|
||||||
|
beauylog.registerLoggly(
|
||||||
|
token: "your-really-long-input-token",
|
||||||
|
subdomain: "your-subdomain",
|
||||||
|
auth: {
|
||||||
|
username: "your-username",
|
||||||
|
password: "your-password"
|
||||||
|
},
|
||||||
|
//
|
||||||
|
// Optional: Tag to send with EVERY log message
|
||||||
|
//
|
||||||
|
tags: ['global-tag']
|
||||||
|
);
|
||||||
|
```
|
||||||
|
|
||||||
|
> Note: since beautylog monkeypatches all console log methods.
|
||||||
|
There is no need to change anything in your code.
|
||||||
|
Everything that is getting logged to your console by node will get logged to loggly as well.
|
||||||
|
|
||||||
## About the authors:
|
## About the authors:
|
||||||
[![Project Phase](https://mediaserve.lossless.digital/lossless.com/img/createdby_github.svg)](https://lossless.com/)
|
[![Project Phase](https://mediaserve.lossless.digital/lossless.com/img/createdby_github.svg)](https://lossless.com/)
|
||||||
|
|
||||||
|
46
dist/beautylog.classes.ora.js
vendored
46
dist/beautylog.classes.ora.js
vendored
@ -1,11 +1,10 @@
|
|||||||
"use strict";
|
"use strict";
|
||||||
require("typings-global");
|
require("typings-global");
|
||||||
var plugins = require("./beautylog.plugins");
|
const plugins = require("./beautylog.plugins");
|
||||||
var beautylog_log_helpers_1 = require("./beautylog.log.helpers");
|
const beautylog_log_helpers_1 = require("./beautylog.log.helpers");
|
||||||
exports.oraActive = false; // when an Ora is active (e.g. start()) this is true;
|
exports.oraActive = false; // when an Ora is active (e.g. start()) this is true;
|
||||||
var Ora = (function () {
|
class Ora {
|
||||||
function Ora(textArg, colorArg, startArg) {
|
constructor(textArg, colorArg, startArg = false) {
|
||||||
if (startArg === void 0) { startArg = false; }
|
|
||||||
this._oraObject = plugins.ora({
|
this._oraObject = plugins.ora({
|
||||||
spinner: "dots",
|
spinner: "dots",
|
||||||
text: textArg,
|
text: textArg,
|
||||||
@ -13,11 +12,11 @@ var Ora = (function () {
|
|||||||
});
|
});
|
||||||
startArg ? this._oraObject.start() : void (0);
|
startArg ? this._oraObject.start() : void (0);
|
||||||
}
|
}
|
||||||
Ora.prototype.text = function (textArg) {
|
text(textArg) {
|
||||||
this._oraObject.text = textArg;
|
this._oraObject.text = textArg;
|
||||||
};
|
}
|
||||||
;
|
;
|
||||||
Ora.prototype.start = function (textArg, colorArg) {
|
start(textArg, colorArg) {
|
||||||
if (textArg)
|
if (textArg)
|
||||||
this._oraObject.text = textArg;
|
this._oraObject.text = textArg;
|
||||||
if (colorArg)
|
if (colorArg)
|
||||||
@ -25,37 +24,36 @@ var Ora = (function () {
|
|||||||
exports.activeOra = this;
|
exports.activeOra = this;
|
||||||
exports.oraActive = true;
|
exports.oraActive = true;
|
||||||
this._oraObject.start();
|
this._oraObject.start();
|
||||||
};
|
}
|
||||||
;
|
;
|
||||||
Ora.prototype.end = function () {
|
end() {
|
||||||
this._oraObject.stop();
|
this._oraObject.stop();
|
||||||
this._oraObject.clear();
|
this._oraObject.clear();
|
||||||
exports.activeOra = undefined;
|
exports.activeOra = undefined;
|
||||||
exports.oraActive = false;
|
exports.oraActive = false;
|
||||||
};
|
}
|
||||||
Ora.prototype.endOk = function (textArg) {
|
endOk(textArg) {
|
||||||
this.end();
|
this.end();
|
||||||
beautylog_log_helpers_1.logNode(textArg, "ok");
|
beautylog_log_helpers_1.logNode(textArg, "ok");
|
||||||
};
|
}
|
||||||
;
|
;
|
||||||
Ora.prototype.endError = function (textArg) {
|
endError(textArg) {
|
||||||
this.end();
|
this.end();
|
||||||
beautylog_log_helpers_1.logNode(textArg, "error");
|
beautylog_log_helpers_1.logNode(textArg, "error");
|
||||||
};
|
}
|
||||||
;
|
;
|
||||||
Ora.prototype.pause = function () {
|
pause() {
|
||||||
this._oraObject.stop();
|
this._oraObject.stop();
|
||||||
};
|
}
|
||||||
Ora.prototype.stop = function () {
|
stop() {
|
||||||
this.end();
|
this.end();
|
||||||
};
|
}
|
||||||
// log methods that play nice with ora
|
// log methods that play nice with ora
|
||||||
Ora.prototype.log = function (logText, logType) {
|
log(logText, logType) {
|
||||||
this.stop();
|
this.stop();
|
||||||
beautylog_log_helpers_1.logNode(logText, logType);
|
beautylog_log_helpers_1.logNode(logText, logType);
|
||||||
this.start();
|
this.start();
|
||||||
};
|
}
|
||||||
return Ora;
|
}
|
||||||
}());
|
|
||||||
exports.Ora = Ora;
|
exports.Ora = Ora;
|
||||||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYmVhdXR5bG9nLmNsYXNzZXMub3JhLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vdHMvYmVhdXR5bG9nLmNsYXNzZXMub3JhLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7QUFBQSxRQUFPLGdCQUFnQixDQUFDLENBQUE7QUFDeEIsSUFBWSxPQUFPLFdBQU0scUJBQXFCLENBQUMsQ0FBQTtBQUMvQyxzQ0FBc0IseUJBQXlCLENBQUMsQ0FBQTtBQUVyQyxpQkFBUyxHQUFXLEtBQUssQ0FBQyxDQUFDLHFEQUFxRDtBQUczRjtJQUdJLGFBQVksT0FBYyxFQUFDLFFBQWUsRUFBQyxRQUF3QjtRQUF4Qix3QkFBd0IsR0FBeEIsZ0JBQXdCO1FBQy9ELElBQUksQ0FBQyxVQUFVLEdBQUcsT0FBTyxDQUFDLEdBQUcsQ0FBQztZQUMxQixPQU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UFBRSxDQUFDO1FBQ1gsK0JBQU8sQ0FBQyxPQUFPLEVBQUMsSUFBSSxDQUFDLENBQUM7SUFDMUIsQ0FBQzs7SUFDRCxRQUFRLENBQUMsT0FBTztRQUNaLElBQUksQ0FBQyxHQUFHLEVBQUUsQ0FBQztRQUNYLCtCQUFPLENBQUMsT0FBTyxFQUFDLE9BQU8sQ0FBQyxDQUFDO0lBQzdCLENBQUM7O0lBQ0QsS0FBSztRQUNELElBQUksQ0FBQyxVQUFVLENBQUMsSUFBSSxFQUFFLENBQUM7SUFDM0IsQ0FBQztJQUNELElBQUk7UUFDQSxJQUFJLENBQUMsR0FBRyxFQUFFLENBQUM7SUFDZixDQUFDO0lBRUQsc0NBQXNDO0lBQ3RDLEdBQUcsQ0FBQyxPQUFjLEVBQUMsT0FBYztRQUM3QixJQUFJLENBQUMsSUFBSSxFQUFFLENBQUM7UUFDWiwrQkFBTyxDQUFDLE9BQU8sRUFBQyxPQUFPLENBQUMsQ0FBQztRQUN6QixJQUFJLENBQUMsS0FBSyxFQUFFLENBQUM7SUFDakIsQ0FBQztBQUNMLENBQUM7QUFsRFksV0FBRyxNQWtEZixDQUFBIn0=
|
34
dist/beautylog.classes.table.js
vendored
34
dist/beautylog.classes.table.js
vendored
@ -1,20 +1,17 @@
|
|||||||
"use strict";
|
"use strict";
|
||||||
require("typings-global");
|
require("typings-global");
|
||||||
var plugins = require("./beautylog.plugins");
|
const plugins = require("./beautylog.plugins");
|
||||||
var tableHelpers = {
|
let tableHelpers = {
|
||||||
makeRow: function (cellCounterArg, colorArg) {
|
makeRow: function (cellCounterArg = 2, colorArg = "cyan") {
|
||||||
if (cellCounterArg === void 0) { cellCounterArg = 2; }
|
let rowArray = [];
|
||||||
if (colorArg === void 0) { colorArg = "cyan"; }
|
for (let i = 0; i < (cellCounterArg); i++) {
|
||||||
var rowArray = [];
|
|
||||||
for (var i = 0; i < (cellCounterArg); i++) {
|
|
||||||
rowArray.push(String(i + 1).cyan);
|
rowArray.push(String(i + 1).cyan);
|
||||||
}
|
}
|
||||||
return rowArray;
|
return rowArray;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
var Table = (function () {
|
class Table {
|
||||||
function Table(tableTypeArg, tableHeadArrayArg) {
|
constructor(tableTypeArg, tableHeadArrayArg = tableHelpers.makeRow()) {
|
||||||
if (tableHeadArrayArg === void 0) { tableHeadArrayArg = tableHelpers.makeRow(); }
|
|
||||||
switch (tableTypeArg) {
|
switch (tableTypeArg) {
|
||||||
case "checks":
|
case "checks":
|
||||||
this.tableHead = ['Check Item:'.cyan, 'Status:'.cyan];
|
this.tableHead = ['Check Item:'.cyan, 'Status:'.cyan];
|
||||||
@ -28,14 +25,14 @@ var Table = (function () {
|
|||||||
this.rows = [];
|
this.rows = [];
|
||||||
this.type = tableTypeArg;
|
this.type = tableTypeArg;
|
||||||
}
|
}
|
||||||
Table.prototype.push = function (row) {
|
push(row) {
|
||||||
this.rows.push(row);
|
this.rows.push(row);
|
||||||
};
|
}
|
||||||
Table.prototype.print = function () {
|
print() {
|
||||||
var table = new plugins.cliTable({
|
let table = new plugins.cliTable({
|
||||||
head: this.tableHead
|
head: this.tableHead
|
||||||
});
|
});
|
||||||
for (var row in this.rows) {
|
for (let row in this.rows) {
|
||||||
if (this.rows[row][1] == "success") {
|
if (this.rows[row][1] == "success") {
|
||||||
this.rows[row][1] = ' '.bgGreen + ' ' + this.rows[row][1];
|
this.rows[row][1] = ' '.bgGreen + ' ' + this.rows[row][1];
|
||||||
}
|
}
|
||||||
@ -46,8 +43,7 @@ var Table = (function () {
|
|||||||
}
|
}
|
||||||
;
|
;
|
||||||
console.log(table.toString());
|
console.log(table.toString());
|
||||||
};
|
}
|
||||||
return Table;
|
}
|
||||||
}());
|
|
||||||
exports.Table = Table;
|
exports.Table = Table;
|
||||||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYmVhdXR5bG9nLmNsYXNzZXMudGFibGUuanMiLCJzb3VyY2VSb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Q0FBQyxDQUFBLENBQUM7Z0JBQy9CLElBQUksQ0FBQyxJQUFJLENBQUMsR0FBRyxDQUFDLENBQUMsQ0FBQyxDQUFDLEdBQUcsR0FBRyxDQUFDLE9BQU8sR0FBRyxHQUFHLEdBQUcsSUFBSSxDQUFDLElBQUksQ0FBQyxHQUFHLENBQUMsQ0FBQyxDQUFDLENBQUMsQ0FBQztZQUM5RCxDQUFDO1lBQUMsSUFBSSxDQUFDLEVBQUUsQ0FBQyxDQUFDLElBQUksQ0FBQyxJQUFJLENBQUMsR0FBRyxDQUFDLENBQUMsQ0FBQyxDQUFDLElBQUksT0FBTyxDQUFDLENBQUMsQ0FBQztnQkFDdEMsSUFBSSxDQUFDLElBQUksQ0FBQyxHQUFHLENBQUMsQ0FBQyxDQUFDLENBQUMsR0FBRyxHQUFHLENBQUMsS0FBSyxHQUFHLEdBQUcsR0FBRyxJQUFJLENBQUMsSUFBSSxDQUFDLEdBQUcsQ0FBQyxDQUFDLENBQUMsQ0FBQyxDQUFDO1lBQzVELENBQUM7WUFDRCxLQUFLLENBQUMsSUFBSSxDQUFDLElBQUksQ0FBQyxJQUFJLENBQUMsR0FBRyxDQUFDLENBQUMsQ0FBQztRQUMvQixDQUFDO1FBQUEsQ0FBQztRQUNGLE9BQU8sQ0FBQyxHQUFHLENBQUMsS0FBSyxDQUFDLFFBQVEsRUFBRSxDQUFDLENBQUM7SUFDbEMsQ0FBQztBQUNMLENBQUM7QUFuQ1ksYUFBSyxRQW1DakIsQ0FBQSJ9
|
5
dist/beautylog.console.d.ts
vendored
5
dist/beautylog.console.d.ts
vendored
@ -1,8 +1,5 @@
|
|||||||
import "typings-global";
|
import "typings-global";
|
||||||
export declare let beautyConsole: {
|
export declare let beautyConsole: {
|
||||||
log2: {
|
|
||||||
(message?: any, ...optionalParams: any[]): void;
|
|
||||||
(message?: any, ...optionalParams: any[]): void;
|
|
||||||
};
|
|
||||||
log: (logArg: any) => void;
|
log: (logArg: any) => void;
|
||||||
|
error: () => void;
|
||||||
};
|
};
|
||||||
|
21
dist/beautylog.console.js
vendored
21
dist/beautylog.console.js
vendored
@ -1,20 +1,21 @@
|
|||||||
"use strict";
|
"use strict";
|
||||||
require("typings-global");
|
require("typings-global");
|
||||||
var beautylog_classes_ora_1 = require("./beautylog.classes.ora");
|
const beautylog_classes_ora_1 = require("./beautylog.classes.ora");
|
||||||
var nativeLog = console.log;
|
let nativeLog = console.log;
|
||||||
|
let nativeError = console.error;
|
||||||
/**
|
/**
|
||||||
* routes the console to got through beautylog, so beautylog can take action before things are logged to console.
|
* routes the console to got through beautylog, so beautylog can take action before things are logged to console.
|
||||||
*/
|
*/
|
||||||
var route = function (statusArg) {
|
let route = function (statusArg) {
|
||||||
if (statusArg == true) {
|
if (statusArg == true) {
|
||||||
console.log = exports.beautyConsole.log;
|
console.log = exports.beautyConsole.log;
|
||||||
|
console.error = exports.beautyConsole.error;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
console.log = nativeLog;
|
console.log = nativeLog;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
exports.beautyConsole = {
|
exports.beautyConsole = {
|
||||||
log2: nativeLog,
|
|
||||||
log: function (logArg) {
|
log: function (logArg) {
|
||||||
if (beautylog_classes_ora_1.oraActive) {
|
if (beautylog_classes_ora_1.oraActive) {
|
||||||
beautylog_classes_ora_1.activeOra.pause();
|
beautylog_classes_ora_1.activeOra.pause();
|
||||||
@ -24,7 +25,17 @@ exports.beautyConsole = {
|
|||||||
else {
|
else {
|
||||||
nativeLog.apply(nativeLog, arguments);
|
nativeLog.apply(nativeLog, arguments);
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
error: function () {
|
||||||
|
if (beautylog_classes_ora_1.oraActive) {
|
||||||
|
beautylog_classes_ora_1.activeOra.pause();
|
||||||
|
nativeLog.apply(nativeError, arguments);
|
||||||
|
beautylog_classes_ora_1.activeOra.start();
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
nativeLog.apply(nativeError, arguments);
|
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0FBQyxLQUFLLENBQUMsU0FBUyxFQUFFLFNBQVMsQ0FBQyxDQUFDO1lBQ3RDLGlDQUFTLENBQUMsS0FBSyxFQUFFLENBQUM7UUFDdEIsQ0FBQztRQUFDLElBQUksQ0FBQyxDQUFDO1lBQ0osU0FBUyxDQUFDLEtBQUssQ0FBQyxTQUFTLEVBQUUsU0FBUyxDQUFDLENBQUM7UUFDMUMsQ0FBQztJQUNMLENBQUM7SUFDRCxLQUFLLEVBQUU7UUFDSCxFQUFFLENBQUEsQ0FBQyxpQ0FBUyxDQUFDLENBQUEsQ0FBQztZQUNWLGlDQUFTLENBQUMsS0FBSyxFQUFFLENBQUM7WUFDbEIsU0FBUyxDQUFDLEtBQUssQ0FBQyxXQUFXLEVBQUUsU0FBUyxDQUFDLENBQUM7WUFDeEMsaUNBQVMsQ0FBQyxLQUFLLEVBQUUsQ0FBQztRQUN0QixDQUFDO1FBQUMsSUFBSSxDQUFDLENBQUM7WUFDSixTQUFTLENBQUMsS0FBSyxDQUFDLFdBQVcsRUFBRSxTQUFTLENBQUMsQ0FBQztRQUM1QyxDQUFDO0lBQ0wsQ0FBQztDQUNKLENBQUE7QUFFRCxLQUFLLENBQUMsSUFBSSxDQUFDLENBQUMifQ==
|
4
dist/beautylog.figlet.d.ts
vendored
4
dist/beautylog.figlet.d.ts
vendored
@ -1,3 +1,5 @@
|
|||||||
|
/// <reference types="q" />
|
||||||
import "typings-global";
|
import "typings-global";
|
||||||
export declare var figlet: (textArg: string, optionsArg?: any) => any;
|
import plugins = require("./beautylog.plugins");
|
||||||
|
export declare var figlet: (textArg: string, optionsArg?: any) => plugins.q.Promise<{}>;
|
||||||
export declare var figletSync: (textArg: string, optionsArg?: any) => boolean;
|
export declare var figletSync: (textArg: string, optionsArg?: any) => boolean;
|
||||||
|
4
dist/beautylog.figlet.js
vendored
4
dist/beautylog.figlet.js
vendored
@ -1,6 +1,6 @@
|
|||||||
"use strict";
|
"use strict";
|
||||||
require("typings-global");
|
require("typings-global");
|
||||||
var plugins = require("./beautylog.plugins");
|
const plugins = require("./beautylog.plugins");
|
||||||
var defaultOptions = {
|
var defaultOptions = {
|
||||||
font: "Star Wars",
|
font: "Star Wars",
|
||||||
color: "green",
|
color: "green",
|
||||||
@ -36,4 +36,4 @@ exports.figletSync = function (textArg, optionsArg) {
|
|||||||
})[options.color]);
|
})[options.color]);
|
||||||
return true;
|
return true;
|
||||||
};
|
};
|
||||||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYmVhdXR5bG9nLmZpZ2xldC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uL3RzL2JlYXV0eWxvZy5maWdsZXQudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IjtBQUFBLFFBQU8sZ0JBQWdCLENBQUMsQ0FBQTtBQUN4QixJQUFPLE9BQU8sV0FBVyxxQkFBcUIsQ0FBQyxDQUFDO0FBQ2hELElBQUksY0FBYyxHQUFHO0lBQ2pCLElBQUksRUFBQyxXQUFXO0lBQ2hCLEtBQUssRUFBRSxPQUFPO0lBQ2QsRUFBRSxFQUFFLGNBQVcsQ0FBQztDQUNuQixDQUFDO0FBRVMsY0FBTSxHQUFHLFVBQVMsT0FBYyxFQUFDLFVBQVc7SUFDbkQsSUFBSSxJQUFJLEdBQUcsT0FBTyxDQUFDLENBQUMsQ0FBQyxLQUFLLEVBQUUsQ0FBQztJQUM3QixJQUFJLFlBQVksR0FBRyxPQUFPLENBQUMsTUFBTSxDQUFDLFNBQVMsQ0FBQyxjQUFjLENBQUMsQ0FBQztJQUM1RCxJQUFJLE9BQU8sR0FBRyxPQUFPLENBQUMsTUFBTSxDQUFDLE1BQU0sQ0FBQyxZQUFZLEVBQUMsVUFBVSxDQUFDLENBQUM7SUFDN0QsT0FBTyxDQUFDLE1BQU0sQ0FBQyxPQUFPLEVBQUM7UUFDbkIsSUFBSSxFQUFFLE9BQU8sQ0FBQyxJQUFJO1FBQ2x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BQUMsR0FBRyxDQUFDLHlCQUF5QixDQUFDLENBQUM7WUFDdkMsT0FBTyxDQUFDLEdBQUcsQ0FBQyxHQUFHLENBQUMsQ0FBQztZQUNqQixNQUFNLENBQUM7UUFDWCxDQUFDO1FBQ0QsT0FBTyxDQUFDLEdBQUcsQ0FBQyxJQUFJLENBQUMsT0FBTyxDQUFDLEtBQUssQ0FBQyxDQUFDLENBQUM7UUFDakMsT0FBTyxDQUFDLEVBQUUsRUFBRSxDQUFDO1FBQ2IsSUFBSSxDQUFDLE9BQU8sRUFBRSxDQUFDO0lBQ25CLENBQUMsQ0FBQyxDQUFDO0lBQ0gsTUFBTSxDQUFDLElBQUksQ0FBQyxPQUFPLENBQUM7QUFDeEIsQ0FBQyxDQUFDO0FBRVMsa0JBQVUsR0FBRyxVQUFTLE9BQWMsRUFBQyxVQUFXO0lBQ3ZELElBQUksWUFBWSxHQUFHLE9BQU8sQ0FBQyxNQUFNLENBQUMsU0FBUyxDQUFDLGNBQWMsQ0FBQyxDQUFDO0lBQzVELElBQUksT0FBTyxHQUFHLE9BQU8sQ0FBQyxNQUFNLENBQUMsTUFBTSxDQUFDLFlBQVksRUFBQyxVQUFVLENBQUMsQ0FBQztJQUM3RCxPQUFPLENBQUMsR0FBRyxDQUFDLE9BQU8sQ0FBQyxNQUFNLENBQUMsUUFBUSxDQUFDLE9BQU8sRUFBQztRQUN4QyxJQUFJLEVBQUUsT0FBTyxDQUFDLElBQUk7UUFDbEIsZ0JBQWdCLEVBQUUsU0FBUztRQUMzQixjQUFjLEVBQUUsU0FBUztLQUM1QixDQUFDLENBQUMsT0FBTyxDQUFDLEtBQUssQ0FBQyxDQUFDLENBQUM7SUFDbkIsTUFBTSxDQUFDLElBQUksQ0FBQztBQUNoQixDQUFDLENBQUMifQ==
|
14
dist/beautylog.log.helpers.js
vendored
14
dist/beautylog.log.helpers.js
vendored
@ -1,7 +1,7 @@
|
|||||||
"use strict";
|
"use strict";
|
||||||
var plugins = require("./beautylog.plugins");
|
const plugins = require("./beautylog.plugins");
|
||||||
var beautylog_console_1 = require("./beautylog.console");
|
const beautylog_console_1 = require("./beautylog.console");
|
||||||
var localBl = {
|
let localBl = {
|
||||||
dirPrefix: plugins.clc.bgXterm(39).xterm(231).bold(' DIR ') + ' ',
|
dirPrefix: plugins.clc.bgXterm(39).xterm(231).bold(' DIR ') + ' ',
|
||||||
errorPrefix: ' Error: '.bgRed.white.bold + ' ',
|
errorPrefix: ' Error: '.bgRed.white.bold + ' ',
|
||||||
infoPrefix: plugins.clc.bgXterm(198).xterm(231).bold(' INFO ') + ' ',
|
infoPrefix: plugins.clc.bgXterm(198).xterm(231).bold(' INFO ') + ' ',
|
||||||
@ -16,9 +16,7 @@ var localBl = {
|
|||||||
* @param logType
|
* @param logType
|
||||||
* @returns {boolean}
|
* @returns {boolean}
|
||||||
*/
|
*/
|
||||||
exports.log = function (logText, logType) {
|
exports.log = function (logText = 'empty log', logType = 'normal') {
|
||||||
if (logText === void 0) { logText = 'empty log'; }
|
|
||||||
if (logType === void 0) { logType = 'normal'; }
|
|
||||||
switch (plugins.smartenv.getEnv().runtimeEnv) {
|
switch (plugins.smartenv.getEnv().runtimeEnv) {
|
||||||
case "node":
|
case "node":
|
||||||
exports.logNode(logText, logType);
|
exports.logNode(logText, logType);
|
||||||
@ -71,7 +69,7 @@ exports.logNode = function (logText, logType) {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
var logBrowser = function (logText, logType) {
|
let logBrowser = function (logText, logType) {
|
||||||
switch (logType) {
|
switch (logType) {
|
||||||
case 'dir':
|
case 'dir':
|
||||||
logText = localBl.dirPrefix + plugins.clc.xterm(26)(logText);
|
logText = localBl.dirPrefix + plugins.clc.xterm(26)(logText);
|
||||||
@ -102,4 +100,4 @@ var logBrowser = function (logText, logType) {
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjoz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DLGdCQUFnQixDQUFDLENBQUM7WUFDekYsS0FBSyxDQUFDO1FBQ1Y7WUFDSSxPQUFPLENBQUMsR0FBRyxDQUFDLHVCQUF1QixHQUFHLE9BQU8sR0FBRyxHQUFHLENBQUMsQ0FBQztZQUNyRCxLQUFLLENBQUM7SUFDZCxDQUFDO0FBQ1QsQ0FBQyxDQUFDIn0=
|
28
dist/beautylog.log.js
vendored
28
dist/beautylog.log.js
vendored
@ -1,6 +1,6 @@
|
|||||||
"use strict";
|
"use strict";
|
||||||
require("typings-global");
|
require("typings-global");
|
||||||
var beautylog_log_helpers_1 = require("./beautylog.log.helpers");
|
const beautylog_log_helpers_1 = require("./beautylog.log.helpers");
|
||||||
var beautylog_log_helpers_2 = require("./beautylog.log.helpers");
|
var beautylog_log_helpers_2 = require("./beautylog.log.helpers");
|
||||||
exports.log = beautylog_log_helpers_2.log;
|
exports.log = beautylog_log_helpers_2.log;
|
||||||
/**
|
/**
|
||||||
@ -8,7 +8,7 @@ exports.log = beautylog_log_helpers_2.log;
|
|||||||
* @param logText
|
* @param logText
|
||||||
* @returns {boolean}
|
* @returns {boolean}
|
||||||
*/
|
*/
|
||||||
exports.info = function (logText) {
|
exports.info = (logText) => {
|
||||||
return beautylog_log_helpers_1.log(logText, 'info');
|
return beautylog_log_helpers_1.log(logText, 'info');
|
||||||
};
|
};
|
||||||
/**
|
/**
|
||||||
@ -16,7 +16,7 @@ exports.info = function (logText) {
|
|||||||
* @param logText
|
* @param logText
|
||||||
* @returns {boolean}
|
* @returns {boolean}
|
||||||
*/
|
*/
|
||||||
exports.ok = function (logText) {
|
exports.ok = (logText) => {
|
||||||
return beautylog_log_helpers_1.log(logText, 'ok');
|
return beautylog_log_helpers_1.log(logText, 'ok');
|
||||||
};
|
};
|
||||||
/**
|
/**
|
||||||
@ -24,7 +24,7 @@ exports.ok = function (logText) {
|
|||||||
* @param logText string to log as error
|
* @param logText string to log as error
|
||||||
* @returns {boolean}
|
* @returns {boolean}
|
||||||
*/
|
*/
|
||||||
exports.success = function (logText) {
|
exports.success = (logText) => {
|
||||||
return beautylog_log_helpers_1.log(logText, 'success');
|
return beautylog_log_helpers_1.log(logText, 'success');
|
||||||
};
|
};
|
||||||
/**
|
/**
|
||||||
@ -32,7 +32,7 @@ exports.success = function (logText) {
|
|||||||
* @param logText string to log as error
|
* @param logText string to log as error
|
||||||
* @returns {boolean}
|
* @returns {boolean}
|
||||||
*/
|
*/
|
||||||
exports.warn = function (logText) {
|
exports.warn = (logText) => {
|
||||||
return beautylog_log_helpers_1.log(logText, 'warn');
|
return beautylog_log_helpers_1.log(logText, 'warn');
|
||||||
};
|
};
|
||||||
/**
|
/**
|
||||||
@ -40,7 +40,7 @@ exports.warn = function (logText) {
|
|||||||
* @param logText
|
* @param logText
|
||||||
* @returns {boolean}
|
* @returns {boolean}
|
||||||
*/
|
*/
|
||||||
exports.error = function (logText) {
|
exports.error = (logText) => {
|
||||||
return beautylog_log_helpers_1.log(logText, 'error');
|
return beautylog_log_helpers_1.log(logText, 'error');
|
||||||
};
|
};
|
||||||
/**
|
/**
|
||||||
@ -48,7 +48,7 @@ exports.error = function (logText) {
|
|||||||
* @param logText
|
* @param logText
|
||||||
* @returns {boolean}
|
* @returns {boolean}
|
||||||
*/
|
*/
|
||||||
exports.dir = function (logText) {
|
exports.dir = (logText) => {
|
||||||
return beautylog_log_helpers_1.log(logText, 'dir');
|
return beautylog_log_helpers_1.log(logText, 'dir');
|
||||||
};
|
};
|
||||||
/**
|
/**
|
||||||
@ -56,17 +56,15 @@ exports.dir = function (logText) {
|
|||||||
* @param linesArg
|
* @param linesArg
|
||||||
* @returns void
|
* @returns void
|
||||||
*/
|
*/
|
||||||
exports.newLine = function (linesArg) {
|
exports.newLine = (linesArg = 1) => {
|
||||||
if (linesArg === void 0) { linesArg = 1; }
|
for (let i = 0; i < linesArg; i++) {
|
||||||
for (var i = 0; i < linesArg; i++) {
|
|
||||||
console.log("\n");
|
console.log("\n");
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
/**
|
/**
|
||||||
* logs a reduced log that only logs changes of consequential log messages
|
* logs a reduced log that only logs changes of consequential log messages
|
||||||
*/
|
*/
|
||||||
exports.logReduced = function (logTextArg, repeatEveryTimesArg) {
|
exports.logReduced = (logTextArg, repeatEveryTimesArg = 0) => {
|
||||||
if (repeatEveryTimesArg === void 0) { repeatEveryTimesArg = 0; }
|
|
||||||
if (logTextArg == previousMessage && (repeatEveryTimesArg == 0 || sameMessageCounter != repeatEveryTimesArg)) {
|
if (logTextArg == previousMessage && (repeatEveryTimesArg == 0 || sameMessageCounter != repeatEveryTimesArg)) {
|
||||||
sameMessageCounter++;
|
sameMessageCounter++;
|
||||||
}
|
}
|
||||||
@ -76,6 +74,6 @@ exports.logReduced = function (logTextArg, repeatEveryTimesArg) {
|
|||||||
beautylog_log_helpers_1.log(logTextArg);
|
beautylog_log_helpers_1.log(logTextArg);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
var previousMessage = "";
|
let previousMessage = "";
|
||||||
var sameMessageCounter = 0;
|
let sameMessageCounter = 0;
|
||||||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYmVhdXR5bG9nLmxvZy5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uL3RzL2JlYXV0eWxvZy5sb2cudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IjtBQUFBLFFBQU8sZ0JBQWdCLENBQUMsQ0FBQTtBQUV4QixzQ0FBa0IseUJBQXlCLENBQUMsQ0FBQTtBQUM1QyxzQ0FBa0IseUJBQXlCLENBQUM7QUFBcEMsMENBQW9DO0FBRTVDOzs7O0dBSUc7QUFDUSxZQUFJLEdBQUcsVUFBQyxPQUFPO0lBQ3RCLE1BQU0sQ0FBQywyQkFBRyxDQUFDLE9BQU8sRUFBRSxNQUFNLENBQUMsQ0FBQztBQUNoQyxDQUFDLENBQUM7QUFFRjs7OztHQUlHO0FBQ1EsVUF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1CQUFtQixDQUFDLENBQUMsQ0FBQSxDQUFDO1FBQ3pHLGtCQUFrQixFQUFFLENBQUM7SUFDekIsQ0FBQztJQUFDLElBQUksQ0FBQyxDQUFDO1FBQ0osa0JBQWtCLEdBQUcsQ0FBQyxDQUFDO1FBQ3ZCLGVBQWUsR0FBRyxVQUFVLENBQUM7UUFDN0IsMkJBQUcsQ0FBQyxVQUFVLENBQUMsQ0FBQztJQUNwQixDQUFDO0FBQ0wsQ0FBQyxDQUFDO0FBQ0YsSUFBSSxlQUFlLEdBQVUsRUFBRSxDQUFDO0FBQ2hDLElBQUksa0JBQWtCLEdBQVUsQ0FBQyxDQUFDIn0=
|
7
dist/beautylog.plugins.d.ts
vendored
7
dist/beautylog.plugins.d.ts
vendored
@ -1,9 +1,10 @@
|
|||||||
import "typings-global";
|
import "typings-global";
|
||||||
export declare let lodash: any;
|
export import lodash = require("lodash");
|
||||||
export declare let smartenv: any;
|
export import smartenv = require("smartenv");
|
||||||
export declare let q: any;
|
export import q = require("q");
|
||||||
export declare let cliTable: any;
|
export declare let cliTable: any;
|
||||||
export import colors = require("colors");
|
export import colors = require("colors");
|
||||||
export declare let clc: any;
|
export declare let clc: any;
|
||||||
export declare let figlet: any;
|
export declare let figlet: any;
|
||||||
|
export import loggly = require("loggly");
|
||||||
export declare let ora: any;
|
export declare let ora: any;
|
||||||
|
3
dist/beautylog.plugins.js
vendored
3
dist/beautylog.plugins.js
vendored
@ -7,5 +7,6 @@ exports.cliTable = require("cli-table2");
|
|||||||
exports.colors = require("colors");
|
exports.colors = require("colors");
|
||||||
exports.clc = require("cli-color");
|
exports.clc = require("cli-color");
|
||||||
exports.figlet = require("figlet");
|
exports.figlet = require("figlet");
|
||||||
|
exports.loggly = require("loggly");
|
||||||
exports.ora = require("ora");
|
exports.ora = require("ora");
|
||||||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYmVhdXR5bG9nLnBsdWdpbnMuanMiLCJzb3VyY2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DLFdBQVcsQ0FBQyxDQUFDO0FBQzNCLGNBQU0sR0FBRyxPQUFPLENBQUMsUUFBUSxDQUFDLENBQUM7QUFDeEIsY0FBTSxXQUFXLFFBQVEsQ0FBQyxDQUFDO0FBQzlCLFdBQUcsR0FBRyxPQUFPLENBQUMsS0FBSyxDQUFDLENBQUMifQ==
|
0
dist/beautylog.remote.d.ts
vendored
Normal file
0
dist/beautylog.remote.d.ts
vendored
Normal file
1
dist/beautylog.remote.js
vendored
Normal file
1
dist/beautylog.remote.js
vendored
Normal file
@ -0,0 +1 @@
|
|||||||
|
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYmVhdXR5bG9nLnJlbW90ZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uL3RzL2JlYXV0eWxvZy5yZW1vdGUudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IiJ9
|
@ -31,17 +31,20 @@
|
|||||||
},
|
},
|
||||||
"homepage": "https://gitlab.com/pushrocks/beautylog",
|
"homepage": "https://gitlab.com/pushrocks/beautylog",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@types/colors": "*",
|
"@types/colors": "^0.6.28",
|
||||||
"@types/q": "*",
|
"@types/lodash": "0.0.28",
|
||||||
|
"@types/loggly": "^1.0.28",
|
||||||
|
"@types/q": "^0.0.27",
|
||||||
"cli-color": "^1.1.0",
|
"cli-color": "^1.1.0",
|
||||||
"cli-table2": "^0.2.0",
|
"cli-table2": "^0.2.0",
|
||||||
"colors": "1.1.2",
|
"colors": "1.1.2",
|
||||||
"figlet": "^1.1.2",
|
"figlet": "^1.1.2",
|
||||||
"lodash": "^4.13.1",
|
"lodash": "^4.13.1",
|
||||||
|
"loggly": "^1.1.0",
|
||||||
"ora": "^0.2.3",
|
"ora": "^0.2.3",
|
||||||
"q": "^1.4.1",
|
"q": "^1.4.1",
|
||||||
"smartenv": "^1.2.5",
|
"smartenv": "^1.2.5",
|
||||||
"typings-global": "^1.0.5"
|
"typings-global": "^1.0.6"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"easyserve": "^0.0.5",
|
"easyserve": "^0.0.5",
|
||||||
|
File diff suppressed because one or more lines are too long
@ -2,6 +2,7 @@ import "typings-global";
|
|||||||
import plugins = require("./beautylog.plugins");
|
import plugins = require("./beautylog.plugins");
|
||||||
import {activeOra,oraActive} from "./beautylog.classes.ora";
|
import {activeOra,oraActive} from "./beautylog.classes.ora";
|
||||||
let nativeLog = console.log;
|
let nativeLog = console.log;
|
||||||
|
let nativeError = console.error;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* routes the console to got through beautylog, so beautylog can take action before things are logged to console.
|
* routes the console to got through beautylog, so beautylog can take action before things are logged to console.
|
||||||
@ -9,6 +10,7 @@ let nativeLog = console.log;
|
|||||||
let route = function(statusArg:boolean){
|
let route = function(statusArg:boolean){
|
||||||
if(statusArg == true){
|
if(statusArg == true){
|
||||||
console.log = beautyConsole.log;
|
console.log = beautyConsole.log;
|
||||||
|
console.error = beautyConsole.error;
|
||||||
} else {
|
} else {
|
||||||
console.log = nativeLog;
|
console.log = nativeLog;
|
||||||
}
|
}
|
||||||
@ -16,7 +18,6 @@ let route = function(statusArg:boolean){
|
|||||||
};
|
};
|
||||||
|
|
||||||
export let beautyConsole = {
|
export let beautyConsole = {
|
||||||
log2: nativeLog,
|
|
||||||
log: function(logArg:any){
|
log: function(logArg:any){
|
||||||
if(oraActive){
|
if(oraActive){
|
||||||
activeOra.pause();
|
activeOra.pause();
|
||||||
@ -25,6 +26,15 @@ export let beautyConsole = {
|
|||||||
} else {
|
} else {
|
||||||
nativeLog.apply(nativeLog, arguments);
|
nativeLog.apply(nativeLog, arguments);
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
error: function(){
|
||||||
|
if(oraActive){
|
||||||
|
activeOra.pause();
|
||||||
|
nativeLog.apply(nativeError, arguments);
|
||||||
|
activeOra.start();
|
||||||
|
} else {
|
||||||
|
nativeLog.apply(nativeError, arguments);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,10 +1,11 @@
|
|||||||
import "typings-global";
|
import "typings-global";
|
||||||
|
|
||||||
export let lodash = require("lodash");
|
export import lodash = require("lodash");
|
||||||
export let smartenv = require("smartenv");
|
export import smartenv = require("smartenv");
|
||||||
export let q = require("q")
|
export import q = require("q")
|
||||||
export let cliTable = require("cli-table2");
|
export let cliTable = require("cli-table2");
|
||||||
export import colors = require("colors");
|
export import colors = require("colors");
|
||||||
export let clc = require("cli-color");
|
export let clc = require("cli-color");
|
||||||
export let figlet = require("figlet");
|
export let figlet = require("figlet");
|
||||||
|
export import loggly = require("loggly");
|
||||||
export let ora = require("ora");
|
export let ora = require("ora");
|
||||||
|
0
ts/beautylog.remote.ts
Normal file
0
ts/beautylog.remote.ts
Normal file
Loading…
Reference in New Issue
Block a user