NPM Build Utilities @ 0.1.3
    Preparing search index...

    Interface LoggerInternal

    Shape of a logging utility class to be available within the library.

    These objects probably output to the console, but could also record errors to log files or output in any other way.

    0.1.0-alpha

    interface Logger {
        config: Partial<Config | Config.Internal>;
        nc: NodeConsole;
        params: Partial<Params>;
        vi: VarInspect;
        debug(
            msg: string | string[] | BulkMsgs,
            level: number,
            msgArgs?: Partial<BulkMsgArgs>,
            timeArgs?: Partial<BulkMsgArgs>,
        ): void;
        error(
            msg: string | string[] | BulkMsgs,
            level: number,
            msgArgs?: Partial<BulkMsgArgs>,
            timeArgs?: Partial<BulkMsgArgs>,
        ): void;
        log(
            msg: string | string[] | BulkMsgs,
            level: number,
            msgArgs?: Partial<BulkMsgArgs>,
            timeArgs?: Partial<BulkMsgArgs>,
        ): void;
        progress(
            msg: string | string[] | BulkMsgs,
            level: number,
            msgArgs?: Partial<BulkMsgArgs>,
            timeArgs?: Partial<BulkMsgArgs>,
        ): void;
        verbose(
            msg: string | string[] | BulkMsgs,
            level: number,
            msgArgs?: Partial<BulkMsgArgs>,
            timeArgs?: Partial<BulkMsgArgs>,
        ): void;
        warn(
            msg: string | string[] | BulkMsgs,
            level: number,
            msgArgs?: Partial<BulkMsgArgs>,
            timeArgs?: Partial<BulkMsgArgs>,
        ): void;
    }

    Implemented by

    Index

    Properties

    Current project config.

    Instance to use within/out the class.

    params: Partial<Params>

    Current CLI params.

    Adds VariableInspector capabilities to the logger.

    Methods

    • Internal

      Prints a timestamped log message to the console.

      Parameters

      • msg: string | string[] | BulkMsgs

        The message(s) to print to the console.

      • level: number

        Depth level for output to the console.

      • OptionalmsgArgs: Partial<BulkMsgArgs>

        Argument overrides for the message.

      • OptionaltimeArgs: Partial<BulkMsgArgs>

        Argument overrides for the message's timestamp.

      Returns void