update to latest standards

This commit is contained in:
Philipp Kunz 2017-01-21 23:12:39 +01:00
parent b68eba502f
commit a42dd0ed45
19 changed files with 120 additions and 117 deletions

View File

@ -13,3 +13,4 @@ export declare class Ora {
pause(): void;
stop(): void;
}
export declare let ora: Ora;

View File

@ -50,4 +50,5 @@ class Ora {
}
}
exports.Ora = Ora;
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYmVhdXR5bG9nLmNsYXNzZXMub3JhLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vdHMvYmVhdXR5bG9nLmNsYXNzZXMub3JhLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7QUFBQSwwQkFBdUI7QUFDdkIsK0NBQThDO0FBQzlDLG1FQUErQztBQUVwQyxRQUFBLFNBQVMsR0FBWSxLQUFLLENBQUEsQ0FBQyxvREFBb0Q7QUFHMUY7SUFHSSxZQUFZLE9BQWUsRUFBQyxRQUFnQixFQUFDLFdBQW9CLEtBQUs7UUFDbEUsSUFBSSxDQUFDLFVBQVUsR0FBRyxPQUFPLENBQUMsR0FBRyxDQUFDO1lBQzFCLE9BQU8sRUFBRSxNQUFNO1lBQ2YsSUFBSSxFQUFFLE9BQU87WUFDYixLQUFLLEVBQUUsUUFBUTtTQUNsQixDQUFDLENBQUE7UUFDRixFQUFFLENBQUMsQ0FBQyxRQUFRLENBQUMsQ0FBQyxDQUFDO1lBQ1gsSUFBSSxDQUFDLEtBQUssRUFBRSxDQUFBO1FBQ2hCLENBQUM7SUFDTCxDQUFDO0lBQ0QsSUFBSSxDQUFDLE9BQU87UUFDUixJQUFJLENBQUMsVUFBVSxDQUFDLElBQUksR0FBRyxPQUFPLENBQUE7SUFDbEMsQ0FBQztJQUVELEtBQUssQ0FBQyxPQUFnQixFQUFDLFFBQWlCO1FBQ3BDLEVBQUUsQ0FBQyxDQUFDLE9BQU8sQ0FBQyxDQUFDLENBQUM7WUFBQyxJQUFJLENB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ksQ0FBQTtRQUNoQixpQkFBUyxHQUFHLElBQUksQ0FBQTtRQUNoQixJQUFJLENBQUMsVUFBVSxDQUFDLEtBQUssRUFBRSxDQUFBO0lBQzNCLENBQUM7SUFDRCxHQUFHO1FBQ0MsSUFBSSxDQUFDLFVBQVUsQ0FBQyxJQUFJLEVBQUUsQ0FBQTtRQUN0QixJQUFJLENBQUMsVUFBVSxDQUFDLEtBQUssRUFBRSxDQUFBO1FBQ3ZCLGlCQUFTLEdBQUcsU0FBUyxDQUFBO1FBQ3JCLGlCQUFTLEdBQUcsS0FBSyxDQUFBO0lBQ3JCLENBQUM7SUFDRCxLQUFLLENBQUMsT0FBTztRQUNULElBQUksQ0FBQyxHQUFHLEVBQUUsQ0FBQTtRQUNWLCtCQUFPLENBQUMsSUFBSSxFQUFDLE9BQU8sQ0FBQyxDQUFBO0lBQ3pCLENBQUM7SUFDRCxRQUFRLENBQUMsT0FBTztRQUNaLElBQUksQ0FBQyxHQUFHLEVBQUUsQ0FBQTtRQUNWLCtCQUFPLENBQUMsT0FBTyxFQUFDLE9BQU8sQ0FBQyxDQUFBO0lBQzVCLENBQUM7SUFDRCxLQUFLO1FBQ0QsSUFBSSxDQUFDLFVBQVUsQ0FBQyxJQUFJLEVBQUUsQ0FBQTtJQUMxQixDQUFDO0lBQ0QsSUFBSTtRQUNBLElBQUksQ0FBQyxHQUFHLEVBQUUsQ0FBQTtJQUNkLENBQUM7Q0FDSjtBQTVDRCxrQkE0Q0M7QUFFVSxRQUFBLEdBQUcsR0FBRyxJQUFJLEdBQUcsQ0FBQyxTQUFTLEVBQUUsTUFBTSxFQUFFLEtBQUssQ0FBQyxDQUFBIn0=

View File

@ -36,6 +36,10 @@ export declare let error: (logText: any) => void;
* @returns {boolean}
*/
export declare let dir: (logText: any) => void;
/**
* note
*/
export declare let note: (logText: any) => void;
/**
* creates a new empty line
* @param linesArg

File diff suppressed because one or more lines are too long

View File

@ -52,6 +52,12 @@ exports.error = (logText) => {
exports.dir = (logText) => {
return beautylog_log_helpers_1.internalLog('dir', logText);
};
/**
* note
*/
exports.note = (logText) => {
return beautylog_log_helpers_1.internalLog('note', logText);
};
/**
* creates a new empty line
* @param linesArg
@ -77,4 +83,4 @@ exports.logReduced = (logTextArg, repeatEveryTimesArg = 0) => {
};
let previousMessage = '';
let sameMessageCounter = 0;
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYmVhdXR5bG9nLmxvZy5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uL3RzL2JlYXV0eWxvZy5sb2cudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IjtBQUFBLDBCQUF1QjtBQUV2QixtRUFBbUQ7QUFFbkQ7Ozs7R0FJRztBQUVRLFFBQUEsR0FBRyxHQUFHLENBQUMsT0FBTztJQUNyQixNQUFNLENBQUMsbUNBQVcsQ0FBQyxLQUFLLEVBQUMsT0FBTyxDQUFDLENBQUE7QUFDckMsQ0FBQyxDQUFBO0FBRVUsUUFBQSxJQUFJLEdBQUcsQ0FBQyxPQUFPO0lBQ3RCLE1BQU0sQ0FBQyxtQ0FBVyxDQUFDLE1BQU0sRUFBQyxPQUFPLENBQUMsQ0FBQTtBQUN0QyxDQUFDLENBQUE7QUFFRDs7OztHQUlHO0FBQ1EsUUFBQSxFQUFFLEdBQUcsQ0FBQyxPQUFPO0lBQ3BCLE1BQU0sQ0FBQyxtQ0FBVyxDQUFDLElBQUksRUFBQyxPQUFPLENBQUMsQ0FBQTtBQUNwQyxDQUFDLENBQUE7QUFFRDs7OztHQUlHO0FBQ1EsUUFBQSxPQUFPLEdBQUcsQ0FBQyxPQUFPO0lBQ3pCLE1BQU0sQ0FBQyxtQ0FBVyxDQUFDLFNBQVMsRUFBQyxPQUFPLENBQUMsQ0FBQTtBQUN6QyxDQUFDLENBQUE7QUFFRDs7OztHQUlHO0FBQ1EsUUFBQSxJQUFJLEdBQUcsQ0FBQyxPQUFPO0lBQ3R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0FBQTtJQUN4QixDQUFDO0lBQUMsSUFBSSxDQUFDLENBQUM7UUFDSixrQkFBa0IsR0FBRyxDQUFDLENBQUE7UUFDdEIsZUFBZSxHQUFHLFVBQVUsQ0FBQTtRQUM1QixXQUFHLENBQUMsVUFBVSxDQUFDLENBQUE7SUFDbkIsQ0FBQztBQUNMLENBQUMsQ0FBQTtBQUNELElBQUksZUFBZSxHQUFXLEVBQUUsQ0FBQTtBQUNoQyxJQUFJLGtCQUFrQixHQUFXLENBQUMsQ0FBQSJ9

View File

@ -1,4 +1,4 @@
/**
* registers a remote
*/
export declare let registerRemote: any;
export declare let registerRemote: (remoteArg: any) => void;

View File

@ -1,2 +1,9 @@
"use strict";
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYmVhdXR5bG9nLnJlZ2lzdGVyLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vdHMvYmVhdXR5bG9nLnJlZ2lzdGVyLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiIifQ==
const beautylog_remote_1 = require("./beautylog.remote");
/**
* registers a remote
*/
exports.registerRemote = (remoteArg) => {
beautylog_remote_1.remoteArray.push(remoteArg);
};
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYmVhdXR5bG9nLnJlZ2lzdGVyLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vdHMvYmVhdXR5bG9nLnJlZ2lzdGVyLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7QUFBQSx5REFBOEM7QUFFOUM7O0dBRUc7QUFDUSxRQUFBLGNBQWMsR0FBRyxDQUFDLFNBQWM7SUFDdkMsOEJBQVcsQ0FBQyxJQUFJLENBQUMsU0FBUyxDQUFDLENBQUE7QUFDL0IsQ0FBQyxDQUFBIn0=

View File

@ -1,9 +1,8 @@
export interface ILogMethod {
(logType: string, logMessage: string): void;
}
export interface IBeautyRemote {
log: ILogMethod;
}
export declare let remoteArray: IBeautyRemote[];
export declare let remoteLog: (logType: string, logMessage: string) => void;
export declare let remote: {
loggly: (optionsArg: {
token: string;
subdomain: string;
appName: string;
serverName: string;
}) => void;
};

View File

@ -1,32 +1,8 @@
"use strict";
const plugins = require("./beautylog.plugins");
let client;
let clientData = {
serverName: 'myServer',
applicationName: 'myApp',
message: 'undefined',
messageType: 'undefined'
};
exports.remoteArray = [];
exports.remoteLog = (logType, logMessage) => {
clientData.messageType = logType;
clientData.message = logMessage;
if (client) {
client.log(clientData);
for (let beautyremote of exports.remoteArray) {
beautyremote.log(logType, logMessage);
}
;
};
// Service implementations
let loggly = (optionsArg) => {
client = plugins.loggly.createClient({
token: optionsArg.token,
subdomain: optionsArg.subdomain,
tags: [],
json: true
});
clientData.applicationName = optionsArg.appName;
clientData.serverName = optionsArg.serverName;
};
exports.remote = {
loggly: loggly
};
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYmVhdXR5bG9nLnJlbW90ZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uL3RzL2JlYXV0eWxvZy5yZW1vdGUudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IjtBQUFBLCtDQUE4QztBQUU5QyxJQUFJLE1BQU0sQ0FBQTtBQUNWLElBQUksVUFBVSxHQUFHO0lBQ2IsVUFBVSxFQUFFLFVBQVU7SUFDdEIsZUFBZSxFQUFFLE9BQU87SUFDeEIsT0FBTyxFQUFFLFdBQVc7SUFDcEIsV0FBVyxFQUFFLFdBQVc7Q0FDM0IsQ0FBQTtBQUNVLFFBQUEsU0FBUyxHQUFHLENBQUMsT0FBZSxFQUFFLFVBQWtCO0lBQ3ZELFVBQVUsQ0FBQyxXQUFXLEdBQUcsT0FBTyxDQUFBO0lBQ2hDLFVBQVUsQ0FBQyxPQUFPLEdBQUcsVUFBVSxDQUFBO0lBQy9CLEVBQUUsQ0FB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UFDLENBQUE7SUFDekMsQ0FBQztBQUNMLENBQUMsQ0FBQSJ9

6
dist/index.d.ts vendored
View File

@ -1,6 +1,6 @@
import 'typings-global';
import './beautylog.console';
export { Ora } from './beautylog.classes.ora';
export { dir, error, info, log, logReduced, ok, success, warn, newLine } from './beautylog.log';
export { ora } from './beautylog.classes.ora';
export { dir, error, info, log, logReduced, note, ok, success, warn, newLine } from './beautylog.log';
export { figlet, figletSync } from './beautylog.figlet';
export { remote } from './beautylog.remote';
export { registerRemote } from './beautylog.register';

9
dist/index.js vendored
View File

@ -3,7 +3,7 @@ require("typings-global");
require("./beautylog.console");
// export classes
var beautylog_classes_ora_1 = require("./beautylog.classes.ora");
exports.Ora = beautylog_classes_ora_1.Ora;
exports.ora = beautylog_classes_ora_1.ora;
// export methods
var beautylog_log_1 = require("./beautylog.log");
exports.dir = beautylog_log_1.dir;
@ -11,6 +11,7 @@ exports.error = beautylog_log_1.error;
exports.info = beautylog_log_1.info;
exports.log = beautylog_log_1.log;
exports.logReduced = beautylog_log_1.logReduced;
exports.note = beautylog_log_1.note;
exports.ok = beautylog_log_1.ok;
exports.success = beautylog_log_1.success;
exports.warn = beautylog_log_1.warn;
@ -18,6 +19,6 @@ exports.newLine = beautylog_log_1.newLine;
var beautylog_figlet_1 = require("./beautylog.figlet");
exports.figlet = beautylog_figlet_1.figlet;
exports.figletSync = beautylog_figlet_1.figletSync;
var beautylog_remote_1 = require("./beautylog.remote");
exports.remote = beautylog_remote_1.remote;
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi90cy9pbmRleC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiO0FBQUEsMEJBQXVCO0FBQ3ZCLCtCQUE0QjtBQUc1QixpQkFBaUI7QUFDakIsaUVBQTJDO0FBQW5DLHNDQUFBLEdBQUcsQ0FBQTtBQUVYLGlCQUFpQjtBQUNqQixpREFBcUY7QUFBN0UsOEJBQUEsR0FBRyxDQUFBO0FBQUMsZ0NBQUEsS0FBSyxDQUFBO0FBQUMsK0JBQUEsSUFBSSxDQUFBO0FBQUMsOEJBQUEsR0FBRyxDQUFBO0FBQUMscUNBQUEsVUFBVSxDQUFBO0FBQUMsNkJBQUEsRUFBRSxDQUFBO0FBQUMsa0NBQUEsT0FBTyxDQUFBO0FBQUMsK0JBQUEsSUFBSSxDQUFBO0FBQUMsa0NBQUEsT0FBTyxDQUFBO0FBQzdELHVEQUFvRDtBQUE1QyxvQ0FBQSxNQUFNLENBQUE7QUFBQyx3Q0FBQSxVQUFVLENBQUE7QUFDekIsdURBQXlDO0FBQWpDLG9DQUFBLE1BQU0sQ0FBQSJ9
var beautylog_register_1 = require("./beautylog.register");
exports.registerRemote = beautylog_register_1.registerRemote;
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi90cy9pbmRleC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiO0FBQUEsMEJBQXVCO0FBQ3ZCLCtCQUE0QjtBQUc1QixpQkFBaUI7QUFDakIsaUVBQTZDO0FBQXBDLHNDQUFBLEdBQUcsQ0FBQTtBQUVaLGlCQUFpQjtBQUNqQixpREFBcUc7QUFBNUYsOEJBQUEsR0FBRyxDQUFBO0FBQUUsZ0NBQUEsS0FBSyxDQUFBO0FBQUUsK0JBQUEsSUFBSSxDQUFBO0FBQUUsOEJBQUEsR0FBRyxDQUFBO0FBQUUscUNBQUEsVUFBVSxDQUFBO0FBQUUsK0JBQUEsSUFBSSxDQUFBO0FBQUUsNkJBQUEsRUFBRSxDQUFBO0FBQUUsa0NBQUEsT0FBTyxDQUFBO0FBQUUsK0JBQUEsSUFBSSxDQUFBO0FBQUUsa0NBQUEsT0FBTyxDQUFBO0FBQzVFLHVEQUF1RDtBQUE5QyxvQ0FBQSxNQUFNLENBQUE7QUFBRSx3Q0FBQSxVQUFVLENBQUE7QUFDM0IsMkRBQXFEO0FBQTVDLDhDQUFBLGNBQWMsQ0FBQSJ9

View File

@ -44,7 +44,7 @@ describe('beautylog', function () {
});
describe('.ok(message)', function () {
it('should display a green ok message', function () {
beautylog.ok('beautylog.ok(), with normal logText, without logType');
beautylog.ok('beautylog.ok() works!');
});
});
describe('.newLine(number)', function () {
@ -55,34 +55,39 @@ describe('beautylog', function () {
describe('.ora(text,color)', function () {
it('should display, update, and end a message', function (done) {
this.timeout(10000);
let testOra = new beautylog.Ora('This is a test text', 'green', true);
beautylog.ora.start('This is a test text', 'green');
setTimeout(function () {
testOra.text('updated text!');
beautylog.ora.text('updated text!');
beautylog.info('another log message that uses the normal log function');
setTimeout(function () {
testOra.endOk('Allright, ora works!');
beautylog.ora.endOk('Allright, ora works!');
done();
}, 2000);
}, 2000);
});
it('should display an error message when ended with error', function (done) {
this.timeout(10000);
let testOra = new beautylog.Ora('This is another test text', 'green');
beautylog.ora.start('This is another test text', 'green');
setTimeout(function () {
testOra.endError('Allright, ora displays an error!');
beautylog.ora.endError('Allright, ora displays an error!');
done();
}, 2000);
});
});
describe('.success(message)', function () {
it('should display an orange warn message', function () {
beautylog.success('beautylog.success(), with normal logText, without logType');
beautylog.success('beautylog.success() works!');
});
});
describe('.warn', function () {
it('should display a orange warn message', function () {
beautylog.warn('beautylog.warn(), with normal logText, without logType');
beautylog.warn('beautylog.warn() works!');
});
});
describe('.note', function () {
it('should display a pink note', function () {
beautylog.note('beautylog.note() works!');
});
});
});
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidGVzdC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbInRlc3QudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IjtBQUFBLHdCQUFxQjtBQUNyQiwyQ0FBMkM7QUFJM0MsUUFBUSxDQUFDLFdBQVcsRUFBQztJQUNq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BQyw0QkFBNEIsRUFBRTtZQUM3QixTQUFTLENBQUMsSUFBSSxDQUFDLHlCQUF5QixDQUFDLENBQUE7UUFDN0MsQ0FBQyxDQUFDLENBQUE7SUFDTixDQUFDLENBQUMsQ0FBQTtBQUNOLENBQUMsQ0FBQyxDQUFBIn0=

View File

@ -46,7 +46,7 @@ describe('beautylog',function(){
})
describe('.ok(message)',function(){
it('should display a green ok message',function(){
beautylog.ok('beautylog.ok(), with normal logText, without logType')
beautylog.ok('beautylog.ok() works!')
})
})
describe('.newLine(number)',function(){
@ -57,33 +57,38 @@ describe('beautylog',function(){
describe('.ora(text,color)',function(){
it('should display, update, and end a message',function(done){
this.timeout(10000)
let testOra = new beautylog.Ora('This is a test text','green',true)
beautylog.ora.start('This is a test text','green')
setTimeout(function(){
testOra.text('updated text!')
beautylog.ora.text('updated text!')
beautylog.info('another log message that uses the normal log function')
setTimeout(function(){
testOra.endOk('Allright, ora works!')
beautylog.ora.endOk('Allright, ora works!')
done()
},2000)
},2000)
})
it('should display an error message when ended with error',function(done){
this.timeout(10000)
let testOra = new beautylog.Ora('This is another test text','green')
beautylog.ora.start('This is another test text','green')
setTimeout(function(){
testOra.endError('Allright, ora displays an error!')
beautylog.ora.endError('Allright, ora displays an error!')
done()
},2000)
})
})
describe('.success(message)',function(){
it('should display an orange warn message',function(){
beautylog.success('beautylog.success(), with normal logText, without logType')
beautylog.success('beautylog.success() works!')
})
})
describe('.warn',function(){
it('should display a orange warn message',function(){
beautylog.warn('beautylog.warn(), with normal logText, without logType')
beautylog.warn('beautylog.warn() works!')
})
})
describe('.note', function() {
it('should display a pink note', function() {
beautylog.note('beautylog.note() works!')
})
})
})

View File

@ -50,3 +50,5 @@ export class Ora {
this.end()
}
}
export let ora = new Ora('init...', 'blue', false)

View File

@ -1,5 +1,4 @@
import * as plugins from './beautylog.plugins'
import { beautyConsole } from './beautylog.console'
import { remoteLog } from './beautylog.remote'
/**
@ -27,12 +26,13 @@ let coloredString = plugins.beautycolor.coloredString
let localBl = {
dirPrefix: coloredString(' DIR ', 'white', 'blue') + ' ',
errorPrefix: coloredString(' ', 'red','red') + coloredString(' Error: ', 'red', 'black') + ' ',
infoPrefix: coloredString(' ', 'blue', 'blue') + coloredString(' INFO ', 'blue', 'black') + ' ',
logPrefix: coloredString(' ', 'white', 'cyan') + coloredString(' Log: ', 'cyan', 'black') + ' ',
errorPrefix: coloredString(' ', 'red','red') + coloredString(' ERROR! ', 'red', 'black') + ' ',
infoPrefix: coloredString(' ', 'blue', 'blue') + coloredString(' INFO: ', 'blue', 'black') + ' ',
logPrefix: coloredString(' ', 'white', 'cyan') + coloredString(' LOG: ', 'cyan', 'black') + ' ',
notePrefix: coloredString(' ', 'pink', 'pink') + coloredString( ' NOTE -> ', 'pink', 'black') + ' ',
okPrefix: coloredString(' ', 'green', 'green') + coloredString(' OK! ', 'green', 'black') + ' ',
successPrefix: coloredString(' ', 'green', 'green') + coloredString(' Success: ', 'green', 'black') + ' ',
warnPrefix: coloredString(' ', 'orange', 'orange') + coloredString(' Warn: ', 'orange', 'black') + ' '
successPrefix: coloredString(' ', 'green', 'green') + coloredString(' SUCCESS! ', 'green', 'black') + ' ',
warnPrefix: coloredString(' ', 'orange', 'orange') + coloredString(' WARN: -> ', 'orange', 'black') + ' '
}
export let logNode = function (logType: string, logText: string) {
@ -50,6 +50,9 @@ export let logNode = function (logType: string, logText: string) {
case 'normal':
logText = localBl.logPrefix + coloredString(logText, 'cyan')
break
case 'note':
logText = localBl.notePrefix + coloredString(logText, 'pink')
break
case 'ok':
logText = localBl.okPrefix + coloredString(logText, 'green')
break
@ -67,7 +70,7 @@ export let logNode = function (logType: string, logText: string) {
console.log(('unknown logType for "' + logText + '"'))
break
}
beautyConsole.log(logText)
console.log(logText)
return true
} catch (error) {
console.log(localBl.errorPrefix

View File

@ -61,6 +61,13 @@ export let dir = (logText) => {
return internalLog('dir',logText)
}
/**
* note
*/
export let note = (logText) => {
return internalLog('note', logText)
}
/**
* creates a new empty line
* @param linesArg

View File

@ -1,4 +1,8 @@
import {remoteArray} from './beautylog.remote'
/**
* registers a remote
*/
export let registerRemote
export let registerRemote = (remoteArg: any) => {
remoteArray.push(remoteArg)
}

View File

@ -1,38 +1,17 @@
import * as plugins from './beautylog.plugins'
let client
let clientData = {
serverName: 'myServer',
applicationName: 'myApp',
message: 'undefined',
messageType: 'undefined'
export interface ILogMethod {
(logType: string, logMessage: string): void
}
export interface IBeautyRemote {
log: ILogMethod
}
export let remoteArray: IBeautyRemote[] = []
export let remoteLog = (logType: string, logMessage: string) => {
clientData.messageType = logType
clientData.message = logMessage
if (client) {
client.log(clientData)
};
}
// Service implementations
let loggly = (optionsArg: {
token: string,
subdomain: string,
appName: string,
serverName: string
}) => {
client = plugins.loggly.createClient({
token: optionsArg.token,
subdomain: optionsArg.subdomain,
tags: [],
json: true
})
clientData.applicationName = optionsArg.appName
clientData.serverName = optionsArg.serverName
}
export let remote = {
loggly: loggly
for (let beautyremote of remoteArray) {
beautyremote.log(logType, logMessage)
}
}

View File

@ -3,9 +3,9 @@ import './beautylog.console'
import * as plugins from './beautylog.plugins'
// export classes
export {Ora} from './beautylog.classes.ora'
export { ora } from './beautylog.classes.ora'
// export methods
export {dir,error,info,log,logReduced,ok,success,warn,newLine} from './beautylog.log'
export {figlet,figletSync} from './beautylog.figlet'
export {remote} from './beautylog.remote'
export { dir, error, info, log, logReduced, note, ok, success, warn, newLine } from './beautylog.log'
export { figlet, figletSync } from './beautylog.figlet'
export { registerRemote } from './beautylog.register'