mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-02-24 09:42:43 +00:00
* Added 'node-loggly-bulk' package support * Fix LogglyBulkConstructor interface constructor
33 lines
729 B
TypeScript
33 lines
729 B
TypeScript
import { createClient, Loggly, serialize } from 'node-loggly-bulk';
|
|
|
|
const client = createClient({
|
|
token: 'test-token',
|
|
subdomain: 'test-subdomain',
|
|
});
|
|
|
|
client.log('Test message');
|
|
client.log({ json: 'yes' }, ['some-tag'], () => {});
|
|
|
|
new Loggly({
|
|
token: 'YOUR_TOKEN',
|
|
subdomain: 'YOUR_DOMAIN',
|
|
tags: ['NodeJS'],
|
|
json: true,
|
|
auth: {
|
|
username: 'your-username',
|
|
password: 'your-password',
|
|
},
|
|
proxy: null,
|
|
userAgent: 'test-user-agent-header',
|
|
useTagHeader: true,
|
|
isBulk: true,
|
|
bufferOptions: {
|
|
size: 500,
|
|
retriesInMilliSeconds: 30000,
|
|
},
|
|
networkErrorsOnConsole: false,
|
|
});
|
|
|
|
serialize({ key: 'value' }, 'key');
|
|
serialize({ key: 'value' });
|