fix README

This commit is contained in:
Philipp Kunz 2016-07-24 01:30:30 +02:00
parent 35fd765546
commit ba6dbc3915
4 changed files with 38 additions and 30 deletions

View File

@ -75,18 +75,12 @@ Currently supported remote providers:
* loggly.com
```typescript
beautylog.remote.loggly(
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']
);
beautylog.remote.loggly({
customerTokenArg: "loggly-token",
subdomainArg: "loggly-subdomain",
appName: "some App Name",
serverName: "some Server Name"
});
```
> Note: since beautylog monkeypatches all console log methods.

View File

@ -1,4 +1,9 @@
export declare let remoteLog: (logType: string, logMessage: string) => void;
export declare let remote: {
loggly: (customerTokenArg: string, subdomainArg: string) => void;
loggly: (optionsArg: {
customerTokenArg: string;
subdomainArg: string;
appName: string;
serverName: string;
}) => void;
};

View File

@ -16,15 +16,17 @@ exports.remoteLog = (logType, logMessage) => {
;
};
// Service implementations
let loggly = (customerTokenArg, subdomainArg) => {
let loggly = (optionsArg) => {
client = plugins.loggly.createClient({
token: customerTokenArg,
subdomain: subdomainArg,
tags: ["beautylog-test"],
token: optionsArg.customerTokenArg,
subdomain: optionsArg.subdomainArg,
tags: [],
json: true
});
clientData.applicationName = optionsArg.appName;
clientData.serverName = optionsArg.serverName;
};
exports.remote = {
loggly: loggly
};
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYmVhdXR5bG9nLnJlbW90ZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uL3RzL2JlYXV0eWxvZy5yZW1vdGUudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IjtBQUFBLE1BQVksT0FBTyxXQUFNLHFCQUFxQixDQUFDLENBQUE7QUFFL0MsSUFBSSxNQUFNLENBQUM7QUFDWCxJQUFJLFVBQVUsR0FBRztJQUNiLFVBQVUsRUFBQyxVQUFVO0lBQ3JCLGVBQWUsRUFB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sR0FBRztJQUNiLFVBQVUsRUFBRSxVQUFVO0lBQ3RCLGVBQWUsRUFBRSxPQUFPO0lBQ3hCLE9BQU8sRUFBRSxXQUFXO0lBQ3BCLFdBQVcsRUFBRSxXQUFXO0NBQzNCLENBQUE7QUFDVSxpQkFBUyxHQUFHLENBQUMsT0FBZSxFQUFFLFVBQWtCO0lBQ3ZELFVBQVUsQ0FBQyxXQUFXLEdBQUcsT0FBTyxDQUFDO0lBQ2pDLFVBQVUsQ0FBQyxPQUFPLEdBQUcsVUFBVSxDQUFDO0lBQ2hDLEVBQUUsQ0FBQyxDQUFDLE1BQU0sQ0FBQyxDQUFDLENBQUM7UUFDVCxNQUFNLENBQUMsR0FBRyxDQUFDLFVBQVUsQ0FBQyxDQUFDO0lBQzNCLENBQUM7SUFBQSxDQUFDO0FBQ04sQ0FBQyxDQUFBO0FBRUQsMEJBQTBCO0FBRTFCLElBQUksTUFBTSxHQUFHLENBQUMsVUFLYjtJQUNHLE1BQU0sR0FBRyxPQUFPLENBQUMsTUFBTSxDQUFDLFlBQVksQ0FBQztRQUNqQyxLQUFLLEVBQUUsVUFBVSxDQUFDLGdCQUFnQjtRQUNsQyxTQUFTLEVBQUUsVUFBVSxDQUFDLFlBQVk7UUFDbEMsSUFBSSxFQUFFLEVBQUU7UUFDUixJQUFJLEVBQUUsSUFBSTtLQUNiLENBQUMsQ0FBQztJQUNILFVBQVUsQ0FBQyxlQUFlLEdBQUcsVUFBVSxDQUFDLE9BQU8sQ0FBQztJQUNoRCxVQUFVLENBQUMsVUFBVSxHQUFHLFVBQVUsQ0FBQyxVQUFVLENBQUM7QUFDbEQsQ0FBQyxDQUFBO0FBRVUsY0FBTSxHQUFHO0lBQ2hCLE1BQU0sRUFBRSxNQUFNO0NBQ2pCLENBQUMifQ==

View File

@ -17,13 +17,20 @@ export let remoteLog = (logType:string,logMessage:string) => {
// Service implementations
let loggly = (customerTokenArg:string,subdomainArg:string) => {
let loggly = (optionsArg: {
customerTokenArg: string,
subdomainArg: string,
appName: string,
serverName:string
}) => {
client = plugins.loggly.createClient({
token: customerTokenArg,
subdomain: subdomainArg,
tags: ["beautylog-test"],
token: optionsArg.customerTokenArg,
subdomain: optionsArg.subdomainArg,
tags: [],
json: true
});
clientData.applicationName = optionsArg.appName;
clientData.serverName = optionsArg.serverName;
}
export let remote = {