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

Function forwardProxyLog

apps/hash-api/src/index.ts:271–286  ·  view source on GitHub ↗
(level: "info" | "warn" | "error", args: unknown[])

Source from the content-addressed store, hash-verified

269 * the proxy log message itself.
270 */
271const forwardProxyLog = (level: "info" | "warn" | "error", args: unknown[]) => {
272 const sanitized = sanitizeProxyLogArgs(args);
273 if (sanitized.length === 0) {
274 return;
275 }
276 const [first, ...rest] = sanitized;
277 if (typeof first === "string") {
278 if (rest.length === 0) {
279 logger[level](first);
280 } else {
281 logger[level](first, { args: rest });
282 }
283 return;
284 }
285 logger[level]("[HPM]", { args: sanitized });
286};
287
288const kratosProxyLogger = {
289 /**

Callers 1

index.tsFile · 0.85

Calls 1

sanitizeProxyLogArgsFunction · 0.85

Tested by

no test coverage detected