mirror of
https://github.com/Xevion/xevion.dev.git
synced 2026-01-31 12:26:39 -06:00
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:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user