Compare commits

...

4 Commits

Author SHA1 Message Date
f075f7f23a 1.0.12 2018-11-04 14:56:25 +01:00
809df76043 fix(core): update 2018-11-04 14:56:25 +01:00
d1dde293f6 1.0.11 2018-11-04 14:24:13 +01:00
b7ee6bb9a6 fix(smartlog): add getSmartlogDestination() 2018-11-04 14:24:12 +01:00
3 changed files with 13 additions and 4 deletions

2
package-lock.json generated
View File

@ -1,6 +1,6 @@
{
"name": "@mojoio/logdna",
"version": "1.0.10",
"version": "1.0.12",
"lockfileVersion": 1,
"requires": true,
"dependencies": {

View File

@ -1,6 +1,6 @@
{
"name": "@mojoio/logdna",
"version": "1.0.10",
"version": "1.0.12",
"private": false,
"description": "anunoffical package for the logdna api",
"main": "dist/index.js",

View File

@ -1,7 +1,7 @@
import * as plugins from './logdna.plugins';
import { LogdnaMessage } from './logdna.classes.logmessage';
import { ILogPackage } from '@pushrocks/smartlog-interfaces';
import { ILogPackage, ILogDestination } from '@pushrocks/smartlog-interfaces';
/**
* the main logdna account
@ -71,7 +71,16 @@ export class LogdnaAccount {
/**
* convenience function for smartlog
*/
async sendSmartlogPackage (smartlogPackageArg: ILogPackage) {
public async sendSmartlogPackage (smartlogPackageArg: ILogPackage) {
this.sendLogDnaMessage(LogdnaMessage.fromSmartLogPackage(smartlogPackageArg));
}
/**
* returns a smartlog compatible log destination
*/
public smartlogDestination: ILogDestination = {
handleLog: (logPackageArg) => {
this.sendSmartlogPackage(logPackageArg)
}
};
}