Log Entry
Structured log entry with level, message, service, trace ID, and error details.
logging
Install
$ npx shadcn@latest add @open-types/log-entry
Source
export type LogLevel = "trace" | "debug" | "info" | "warn" | "error" | "fatal";
export interface LogError {
name: string;
message: string;
stack?: string;
}
export interface LogEntry {
level: LogLevel;
message: string;
timestamp: string;
service?: string;
context?: Record<string, unknown>;
error?: LogError;
trace_id?: string;
span_id?: string;
}
export type LogLevel = "trace" | "debug" | "info" | "warn" | "error" | "fatal";
export interface LogError {
name: string;
message: string;
stack?: string;
}
export interface LogEntry {
level: LogLevel;
message: string;
timestamp: string;
service?: string;
context?: Record<string, unknown>;
error?: LogError;
trace_id?: string;
span_id?: string;
}