| 1 | type LogLevel = "info" | "warn" | "error" | "debug"; |
| 2 | |
| 3 | interface LogData { |
| 4 | level: LogLevel; |
| 5 | message: string; |
| 6 | timestamp: string; |
| 7 | data?: unknown; |
| 8 | error?: { |
| 9 | message: string; |
| 10 | stack?: string; |
| 11 | cause?: unknown; |
| 12 | }; |
| 13 | } |
| 14 | |
| 15 | function formatLog(level: LogLevel, message: string, data?: unknown): LogData { |
| 16 | const logData: LogData = { |
nothing calls this directly
no outgoing calls
no test coverage detected