fix README
This commit is contained in:
parent
35fd765546
commit
ba6dbc3915
18
README.md
18
README.md
@ -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.
|
||||
|
7
dist/beautylog.remote.d.ts
vendored
7
dist/beautylog.remote.d.ts
vendored
@ -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;
|
||||
};
|
||||
|
12
dist/beautylog.remote.js
vendored
12
dist/beautylog.remote.js
vendored
@ -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
|
||||
};
|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TtLQUNiLENBQUMsQ0FBQztJQUNILFVBQVUsQ0FBQyxlQUFlLEdBQUcsVUFBVSxDQUFDLE9BQU8sQ0FBQztJQUNoRCxVQUFVLENBQUMsVUFBVSxHQUFHLFVBQVUsQ0FBQyxVQUFVLENBQUM7QUFDbEQsQ0FBQyxDQUFBO0FBRVUsY0FBTSxHQUFHO0lBQ2hCLE1BQU0sRUFBRSxNQUFNO0NBQ2pCLENBQUMifQ==
|
@ -2,28 +2,35 @@ import * as plugins from "./beautylog.plugins";
|
||||
|
||||
let client;
|
||||
let clientData = {
|
||||
serverName:"myServer",
|
||||
applicationName:"myApp",
|
||||
message:"undefined",
|
||||
messageType:"undefined"
|
||||
serverName: "myServer",
|
||||
applicationName: "myApp",
|
||||
message: "undefined",
|
||||
messageType: "undefined"
|
||||
}
|
||||
export let remoteLog = (logType:string,logMessage:string) => {
|
||||
export let remoteLog = (logType: string, logMessage: string) => {
|
||||
clientData.messageType = logType;
|
||||
clientData.message = logMessage;
|
||||
if (client){
|
||||
if (client) {
|
||||
client.log(clientData);
|
||||
};
|
||||
}
|
||||
|
||||
// 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"],
|
||||
json:true
|
||||
token: optionsArg.customerTokenArg,
|
||||
subdomain: optionsArg.subdomainArg,
|
||||
tags: [],
|
||||
json: true
|
||||
});
|
||||
clientData.applicationName = optionsArg.appName;
|
||||
clientData.serverName = optionsArg.serverName;
|
||||
}
|
||||
|
||||
export let remote = {
|
||||
|
Loading…
Reference in New Issue
Block a user