Skip to content

Commit

Permalink
feat(interceptors): add module logger, setLogger()
Browse files Browse the repository at this point in the history
  • Loading branch information
postspectacular committed Aug 19, 2019
1 parent b1cb63b commit 17f050d
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions packages/interceptors/src/api.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { ILogger, NULL_LOGGER } from "@thi.ng/api";
import { ReadonlyAtom } from "@thi.ng/atom";

export type InterceptorFn = (
Expand Down Expand Up @@ -81,3 +82,7 @@ export interface InterceptorContext {
[FX_DISPATCH_ASYNC]?: AsyncEffectDef | AsyncEffectDef[];
[id: string]: any;
}

export let LOGGER = NULL_LOGGER;

export const setLogger = (logger: ILogger) => (LOGGER = logger);

0 comments on commit 17f050d

Please sign in to comment.