Narwhals Poke Mammals

    @orda-io/orda-logger
    TypeScript icon, indicating that this package has built-in type declarations

    0.1.15 • Public • Published

    Orda Logger

    Introduction

    • Orda Logger is a very tiny logger written in TypeScript, which is used in Orda-js project.
    • The size of Orda-logger is about 4KB.

    Install

    $ npm i @orda-io/orda-logger

    How to use

    You can use orda-logger as follows:

    const logFactory = new OrdaLoggerFactory("trace");
    const logger = logFactory.getLogger("test logging");
    logger.trace("trace message");
    logger.debug("debug message");
    const num = 1234;
    logger.info(`info message:${num}`);
    logger.warn("warn message");
    try {
      generate_error();
    } catch (e) {
      logger.error("error message", e);
    }
    logger.log("log withPos back");
    • For nodejs, logging messages accompany by the file positions and the tags.

    image

    • In the chrome console, logging messages accompany only by the tags.

    image

    Install

    npm i @orda-io/orda-logger

    DownloadsWeekly Downloads

    1

    Version

    0.1.15

    License

    Apache-2.0

    Unpacked Size

    31.1 kB

    Total Files

    8

    Last publish

    Collaborators

    • knowhunger