X-Git-Url: http://git.bitcoin.ninja/index.cgi?p=ldk-java;a=blobdiff_plain;f=ts%2Fstructs%2FRecord.mts;h=ed70969c7c24fb1a6d34219cd80890b17a41fe7c;hp=0056d8067396c6c059bcf44931a218d12bf9377f;hb=c629a01650402c8e2f9b9db8ced9ed63ce687727;hpb=2a65456aa0b540060dcf3ca707a54dc98cc3f38a diff --git a/ts/structs/Record.mts b/ts/structs/Record.mts index 0056d806..ed70969c 100644 --- a/ts/structs/Record.mts +++ b/ts/structs/Record.mts @@ -279,56 +279,92 @@ import { MultiThreadedLockableScore } from '../structs/MultiThreadedLockableScor import CommonBase from './CommonBase.mjs'; import * as bindings from '../bindings.mjs' -import * as InternalUtils from '../InternalUtils.mjs' +/** + * A Record, unit of logging output with Metadata to enable filtering + * Module_path, file, line to inform on log's source + */ export class Record extends CommonBase { /* @internal */ public constructor(_dummy: object, ptr: number) { super(ptr, bindings.Record_free); } + /** + * The verbosity level of the message. + */ public get_level(): Level { const ret: Level = bindings.Record_get_level(this.ptr); return ret; } + /** + * The verbosity level of the message. + */ public set_level(val: Level): void { bindings.Record_set_level(this.ptr, val); } - public get_args(): String { - const ret: String = bindings.Record_get_args(this.ptr); - return ret; + /** + * The message body. + */ + public get_args(): string { + const ret: number = bindings.Record_get_args(this.ptr); + const ret_conv: string = bindings.decodeString(ret); + return ret_conv; } - public set_args(val: String): void { - bindings.Record_set_args(this.ptr, val); + /** + * The message body. + */ + public set_args(val: string): void { + bindings.Record_set_args(this.ptr, bindings.encodeString(val)); } - public get_module_path(): String { - const ret: String = bindings.Record_get_module_path(this.ptr); - return ret; + /** + * The module path of the message. + */ + public get_module_path(): string { + const ret: number = bindings.Record_get_module_path(this.ptr); + const ret_conv: string = bindings.decodeString(ret); + return ret_conv; } - public set_module_path(val: String): void { - bindings.Record_set_module_path(this.ptr, val); + /** + * The module path of the message. + */ + public set_module_path(val: string): void { + bindings.Record_set_module_path(this.ptr, bindings.encodeString(val)); } - public get_file(): String { - const ret: String = bindings.Record_get_file(this.ptr); - return ret; + /** + * The source file containing the message. + */ + public get_file(): string { + const ret: number = bindings.Record_get_file(this.ptr); + const ret_conv: string = bindings.decodeString(ret); + return ret_conv; } - public set_file(val: String): void { - bindings.Record_set_file(this.ptr, val); + /** + * The source file containing the message. + */ + public set_file(val: string): void { + bindings.Record_set_file(this.ptr, bindings.encodeString(val)); } + /** + * The line containing the message. + */ public get_line(): number { const ret: number = bindings.Record_get_line(this.ptr); return ret; } + /** + * The line containing the message. + */ public set_line(val: number): void { bindings.Record_set_line(this.ptr, val); } @@ -338,6 +374,9 @@ export class Record extends CommonBase { return ret; } + /** + * Creates a copy of the Record + */ public clone(): Record { const ret: number = bindings.Record_clone(this.ptr); const ret_hu_conv: Record = new Record(null, ret);