MCPcopy Create free account
hub / github.com/hashintel/hash / mapWinstonLevelToOtel

Function mapWinstonLevelToOtel

libs/@local/hash-backend-utils/src/logger.ts:32–45  ·  view source on GitHub ↗
(level: string)

Source from the content-addressed store, hash-verified

30};
31
32function mapWinstonLevelToOtel(level: string): SeverityNumber {
33 switch (level) {
34 case "error":
35 return SeverityNumber.ERROR;
36 case "warn":
37 return SeverityNumber.WARN;
38 case "info":
39 return SeverityNumber.INFO;
40 case "debug":
41 return SeverityNumber.DEBUG;
42 default:
43 return SeverityNumber.TRACE;
44 }
45}
46
47/**
48 * Recursively replace values in a log payload that JSON.stringify cannot

Callers 1

logMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected