Skip to content
This repository was archived by the owner on Dec 8, 2019. It is now read-only.
This repository was archived by the owner on Dec 8, 2019. It is now read-only.

acai: Pass external logger as a function to the library #9

@MartinHelmut

Description

@MartinHelmut

To provide logger functionality it should be possible to pass a logger instance as option to the library. The callback interface could look like the following (written in TypeScript):

enum LogLevel { Info, Warning, Error };
type loggerCallback = (message: string, level: LogLevel) => void;

Usage could look like:

(async () => {
    await scanner('path/to/repo', {
        log(message, level) {
            // map logger to callback ...
        }
    });
})();

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions