logs-interceptor
Version:
High-performance, production-ready log interceptor for Node.js applications with Loki integration. Built with Clean Architecture principles. Supports Node.js, Browser, and Node-RED.
33 lines • 1.02 kB
JavaScript
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.LogEntryEntity = void 0;
class LogEntryEntity {
constructor(id, timestamp, level, message, context, traceId, spanId, requestId, labels, metadata) {
this.id = id;
this.timestamp = timestamp;
this.level = level;
this.message = message;
this.context = context;
this.traceId = traceId;
this.spanId = spanId;
this.requestId = requestId;
this.labels = labels;
this.metadata = metadata;
}
toJSON() {
return {
id: this.id,
timestamp: this.timestamp,
level: this.level,
message: this.message,
context: this.context,
traceId: this.traceId,
spanId: this.spanId,
requestId: this.requestId,
labels: this.labels,
metadata: this.metadata,
};
}
}
exports.LogEntryEntity = LogEntryEntity;
//# sourceMappingURL=LogEntry.js.map