diff --git a/ts/logdna.logdnaaccount.ts b/ts/logdna.logdnaaccount.ts index 93ffea6..b0491cd 100644 --- a/ts/logdna.logdnaaccount.ts +++ b/ts/logdna.logdnaaccount.ts @@ -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 @@ -74,4 +74,15 @@ export class LogdnaAccount { async sendSmartlogPackage (smartlogPackageArg: ILogPackage) { this.sendLogDnaMessage(LogdnaMessage.fromSmartLogPackage(smartlogPackageArg)); } + + /** + * returns a smartlog compatible log destination + */ + async getSmartlogDestination(): Promise { + return { + handleLog: (logPackageArg) => { + this.sendSmartlogPackage(logPackageArg) + } + }; + } }