Compare commits
4 Commits
Author | SHA1 | Date | |
---|---|---|---|
f075f7f23a | |||
809df76043 | |||
d1dde293f6 | |||
b7ee6bb9a6 |
2
package-lock.json
generated
2
package-lock.json
generated
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@mojoio/logdna",
|
"name": "@mojoio/logdna",
|
||||||
"version": "1.0.10",
|
"version": "1.0.12",
|
||||||
"lockfileVersion": 1,
|
"lockfileVersion": 1,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@mojoio/logdna",
|
"name": "@mojoio/logdna",
|
||||||
"version": "1.0.10",
|
"version": "1.0.12",
|
||||||
"private": false,
|
"private": false,
|
||||||
"description": "anunoffical package for the logdna api",
|
"description": "anunoffical package for the logdna api",
|
||||||
"main": "dist/index.js",
|
"main": "dist/index.js",
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
import * as plugins from './logdna.plugins';
|
import * as plugins from './logdna.plugins';
|
||||||
|
|
||||||
import { LogdnaMessage } from './logdna.classes.logmessage';
|
import { LogdnaMessage } from './logdna.classes.logmessage';
|
||||||
import { ILogPackage } from '@pushrocks/smartlog-interfaces';
|
import { ILogPackage, ILogDestination } from '@pushrocks/smartlog-interfaces';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* the main logdna account
|
* the main logdna account
|
||||||
@ -71,7 +71,16 @@ export class LogdnaAccount {
|
|||||||
/**
|
/**
|
||||||
* convenience function for smartlog
|
* convenience function for smartlog
|
||||||
*/
|
*/
|
||||||
async sendSmartlogPackage (smartlogPackageArg: ILogPackage) {
|
public async sendSmartlogPackage (smartlogPackageArg: ILogPackage) {
|
||||||
this.sendLogDnaMessage(LogdnaMessage.fromSmartLogPackage(smartlogPackageArg));
|
this.sendLogDnaMessage(LogdnaMessage.fromSmartLogPackage(smartlogPackageArg));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* returns a smartlog compatible log destination
|
||||||
|
*/
|
||||||
|
public smartlogDestination: ILogDestination = {
|
||||||
|
handleLog: (logPackageArg) => {
|
||||||
|
this.sendSmartlogPackage(logPackageArg)
|
||||||
|
}
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user