MCPcopy Create free account
hub / github.com/langgenius/dify / logRequest

Function logRequest

cli/src/http/hooks.ts:22–31  ·  view source on GitHub ↗
(logger: HttpLogger)

Source from the content-addressed store, hash-verified

20}
21
22export function logRequest(logger: HttpLogger): Hook {
23 return ({ request, meta }) => {
24 meta.set(HTTP_START_SYM, performance.now())
25 logger({
26 phase: 'request',
27 method: request.method,
28 url: redactBearer(request.url),
29 })
30 }
31}
32
33export function logResponse(logger: HttpLogger): Hook {
34 return ({ request, response, meta }) => {

Callers 1

compileStateFunction · 0.85

Calls 3

redactBearerFunction · 0.85
nowMethod · 0.80
setMethod · 0.45

Tested by

no test coverage detected