X-Git-Url: http://git.bitcoin.ninja/index.cgi?p=ldk-java;a=blobdiff_plain;f=ts%2Fstructs%2FLogger.mts;h=1e88a8abf0d59c07977715d618a937a48720c413;hp=e5aafecc562f4f2c98bae926a8a4ddcd5d553dbe;hb=c629a01650402c8e2f9b9db8ced9ed63ce687727;hpb=d1d0121c000b713c10fd0bedd249eb8dda2e4db7 diff --git a/ts/structs/Logger.mts b/ts/structs/Logger.mts index e5aafecc..1e88a8ab 100644 --- a/ts/structs/Logger.mts +++ b/ts/structs/Logger.mts @@ -283,7 +283,10 @@ import * as bindings from '../bindings.mjs' +/** An implementation of Logger */ export interface LoggerInterface { + /**Logs the `Record` + */ log(record: Record): void; } @@ -291,6 +294,9 @@ class LDKLoggerHolder { held: Logger; } +/** + * A trait encapsulating the operations required of a logger + */ export class Logger extends CommonBase { /* @internal */ public bindings_instance?: bindings.LDKLogger; @@ -301,7 +307,8 @@ export class Logger extends CommonBase { this.bindings_instance = null; } - static new_impl(arg: LoggerInterface): Logger { + /** Creates a new instance of Logger from a given implementation */ + public static new_impl(arg: LoggerInterface): Logger { const impl_holder: LDKLoggerHolder = new LDKLoggerHolder(); let structImplementation = { log (record: number): void { @@ -315,4 +322,5 @@ export class Logger extends CommonBase { impl_holder.held.bindings_instance = structImplementation; return impl_holder.held; } + }