fix(smartlog): add getSmartlogDestination()
This commit is contained in:
parent
15cfa8fe88
commit
b7ee6bb9a6
@ -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<ILogDestination> {
|
||||
return {
|
||||
handleLog: (logPackageArg) => {
|
||||
this.sendSmartlogPackage(logPackageArg)
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user