2016-07-23 23:17:38 +00:00
|
|
|
"use strict";
|
|
|
|
const plugins = require("./beautylog.plugins");
|
|
|
|
let client;
|
|
|
|
let clientData = {
|
|
|
|
serverName: "myServer",
|
|
|
|
applicationName: "myApp",
|
|
|
|
message: "undefined",
|
|
|
|
messageType: "undefined"
|
|
|
|
};
|
|
|
|
exports.remoteLog = (logType, logMessage) => {
|
|
|
|
clientData.messageType = logType;
|
|
|
|
clientData.message = logMessage;
|
|
|
|
if (client) {
|
|
|
|
client.log(clientData);
|
|
|
|
}
|
|
|
|
;
|
|
|
|
};
|
|
|
|
// Service implementations
|
2016-07-23 23:30:30 +00:00
|
|
|
let loggly = (optionsArg) => {
|
2016-07-23 23:17:38 +00:00
|
|
|
client = plugins.loggly.createClient({
|
2016-07-23 23:30:30 +00:00
|
|
|
token: optionsArg.customerTokenArg,
|
|
|
|
subdomain: optionsArg.subdomainArg,
|
|
|
|
tags: [],
|
2016-07-23 23:17:38 +00:00
|
|
|
json: true
|
|
|
|
});
|
2016-07-23 23:30:30 +00:00
|
|
|
clientData.applicationName = optionsArg.appName;
|
|
|
|
clientData.serverName = optionsArg.serverName;
|
2016-07-23 23:17:38 +00:00
|
|
|
};
|
|
|
|
exports.remote = {
|
|
|
|
loggly: loggly
|
|
|
|
};
|
2016-07-23 23:30:30 +00:00
|
|
|
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYmVhdXR5bG9nLnJlbW90ZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uL3RzL2JlYXV0eWxvZy5yZW1vdGUudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IjtBQUFBLE1BQVksT0FBTyxXQUFNLHFCQUFxQixDQUFDLENBQUE7QUFFL0MsSUFBSSxNQUFNLENBQUM7QUFDWCxJQUFJLFVBQVUsR0FBRztJQUNiLFVBQVUsRUFBRSxVQUFVO0lBQ3RCLGVBQWUsRUFBRSxPQUFPO0lBQ3h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