@nestjstools/messaging
Version:
Simplifies asynchronous and synchronous message handling with support for buses, handlers, channels, and consumers. Build scalable, decoupled applications with ease and reliability.
20 lines • 498 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.Log = void 0;
class Log {
constructor(content, metadata) {
this.content = content;
this.metadata = metadata;
}
static create(content, metadata) {
return new Log(content, metadata ?? {});
}
toObject() {
return {
logMessage: this.content,
metadata: this.metadata ?? [],
};
}
}
exports.Log = Log;
//# sourceMappingURL=log.js.map