UNPKG

@httpc/kit

Version:

httpc toolbox for building function-based API with minimal code and end-to-end type safety

10 lines (9 loc) 314 B
import { KEY, RESOLVE, useContainer, useInjected } from "../di"; export function useLogger(label) { if (!label) { return useInjected(KEY("ApplicationLogger")); } const container = useContainer(); const log = RESOLVE(container, "ILogService"); return log.createLogger(label); }