refactor: standardize structured logging across Rust and TypeScript

Convert string interpolation to structured fields in tracing/LogTape calls. Add target prefixes (rust::, bun:) to differentiate processes in combined logs.
This commit is contained in:
2026-01-13 15:33:08 -06:00
parent fe23967c5e
commit 6d8766d3a6
5 changed files with 35 additions and 21 deletions
+2 -1
View File
@@ -10,11 +10,12 @@ interface RailwayLogEntry {
}
function railwayFormatter(record: LogRecord): string {
const categoryTarget = record.category.join(":");
const entry: RailwayLogEntry = {
timestamp: new Date().toISOString(),
level: record.level.toLowerCase(),
message: record.message.join(" "),
target: record.category.join(":"),
target: categoryTarget ? `bun:${categoryTarget}` : "bun",
};
if (record.properties && Object.keys(record.properties).length > 0) {