( type: string, ctx: Context | undefined, binding: Binding<unknown>, logger: Logger = debug, )
| 39 | * @param logger - An optional log function |
| 40 | */ |
| 41 | export 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 |
no outgoing calls
no test coverage detected