MCPcopy Index your code
hub / github.com/loopbackio/loopback-next / logContext

Function logContext

examples/binding-resolution/src/util.ts:41–53  ·  view source on GitHub ↗
(
  type: string,
  ctx: Context | undefined,
  binding: Binding<unknown>,
  logger: Logger = debug,
)

Source from the content-addressed store, hash-verified

39 * @param logger - An optional log function
40 */
41export function logContext(
42 type: string,
43 ctx: Context | undefined,
44 binding: Binding<unknown>,
45 logger: Logger = debug,
46) {
47 logger(
48 `[%s%s] ${type} context: %s`,
49 binding.key,
50 binding.scope === BindingScope.SINGLETON ? '*' : '',
51 ctx?.name,
52 );
53}
54
55/**
56 * Log the given HTTP request

Callers 4

pingMethod · 0.90
spyMiddlewareMethod · 0.90
interceptMethod · 0.90
logContextsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected