NPM Build Utilities @ 0.2.0-alpha.1
    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

      Method for printing a log message to the console. Only if CLI.Params.debug is truthy.

      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

    • Internal

      Outputs the given error message to the console.

      Parameters

      • msg: string | string[] | BulkMsgs

        Error message(s).

      • 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

    • 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

    • Internal

      Prints a timestamped log message to the console. Only if CLI.Params.progress is truthy.

      Parameters

      • msg: string | string[] | BulkMsgs

        The message(s) to print to the console.

      • level: number

        Depth level for this message.

      • OptionalmsgArgs: Partial<BulkMsgArgs>

        Argument overrides for the message.

      • OptionaltimeArgs: Partial<BulkMsgArgs>

        Argument overrides for the message's timestamp.

      Returns void

    • Internal

      Method for printing a log message to the console. Only if CLI.Params.verbose is truthy.

      Parameters

      • msg: string | string[] | BulkMsgs

        The message(s) to print to the console.

      • level: number

        Depth level for this message.

      • OptionalmsgArgs: Partial<BulkMsgArgs>

        Argument overrides for the message.

      • OptionaltimeArgs: Partial<BulkMsgArgs>

        Argument overrides for the message's timestamp.

      Returns void

    • Internal

      Outputs the given warning message to the console.

      Parameters

      • msg: string | string[] | BulkMsgs

        Warning message(s).

      • level: number

        Depth level for this message.

      • OptionalmsgArgs: Partial<BulkMsgArgs>

        Argument overrides for the message.

      • OptionaltimeArgs: Partial<BulkMsgArgs>

        Argument overrides for the message's timestamp.

      Returns void