Skip to content

Commit

Permalink
Using the method of a class instance.
Browse files Browse the repository at this point in the history
  • Loading branch information
RobinTail committed Apr 25, 2024
1 parent 54c22ba commit 8e46cb6
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/logger.ts
@@ -1,7 +1,7 @@
import { inspect } from "node:util";
import { isObject } from "./common-helpers";
import { mapObjIndexed } from "ramda";
import ansis, { Ansis, blue, green, hex, red } from "ansis"; // @todo possible named export?
import { Ansis, blue, green, hex, red } from "ansis";

/**
* @desc Using module augmentation approach you can set the type of the actual logger used
Expand All @@ -25,7 +25,7 @@ export interface BuiltinLoggerConfig {
level: "silent" | "warn" | "debug";
/**
* @desc Enables colors on printed severity and inspected entities
* @default ansis.isSupported()
* @default Ansis::isSupported()
* */
color?: boolean;
/**
Expand Down Expand Up @@ -63,7 +63,7 @@ export const isBuiltinLoggerConfig = (
* */
export const createLogger = ({
level,
color = ansis.isSupported(),
color = new Ansis().isSupported(),
depth = 2,
}: BuiltinLoggerConfig): AbstractLogger => {
const styles: Record<keyof AbstractLogger, Ansis> = {
Expand Down

0 comments on commit 8e46cb6

Please sign in to comment.