Skip to content

Commit

Permalink
refactor(system): update LOGGER handling
Browse files Browse the repository at this point in the history
  • Loading branch information
postspectacular committed Feb 16, 2024
1 parent a388a75 commit a11f2a8
Showing 1 changed file with 3 additions and 9 deletions.
12 changes: 3 additions & 9 deletions packages/system/src/api.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import type { Fn, Keys } from "@thi.ng/api";
import type { ILogger } from "@thi.ng/logger";
import { NULL_LOGGER } from "@thi.ng/logger/null";
import { ROOT } from "@thi.ng/logger/root";
import type { System } from "./system.js";

export interface ILifecycle<T extends SystemMap<T> = any> {
Expand Down Expand Up @@ -69,12 +68,7 @@ export type SystemSpecs<T extends SystemMap<T>> = Record<
SystemSpec<T>
>;

/** @internal */
export let LOGGER = NULL_LOGGER;

/**
* Sets package logger to given instance.
*
* @param logger -
* See [thi.ng/logger](https://docs.thi.ng/umbrella/logger/) for usage.
*/
export const setLogger = (logger: ILogger) => (LOGGER = logger);
export const LOGGER = ROOT.childLogger("system");

0 comments on commit a11f2a8

Please sign in to comment.