2.0.14 • Published 3 years ago

@nathangasc/fox_logger v2.0.14

Weekly downloads
-
License
MIT
Repository
-
Last release
3 years ago

Fox Logger

Fox logger is a module to do log with namespaces (ex: here the API namespace log -> "11:23:52 API : GET request on /"). You will be able to disable log for defined namespaces or change log levels for every namespaces to hide error, log, info, debug or warning. You will also be able to format the logs.

This module support typescript (TS).

How to use?

  • Install the module first npm i @nathangasc/fox_logger
  • Copy this script in your code to test the module.
const { createLogger } = require("@nathangasc/fox_logger");
const config = {
  options: {
    format: "[{{h}}:{{m}}:{{s}}] {{namespace}} :",
    isLogged: {
      debug: true,
      log: true,
      error: true,
      warn: true,
      info: true,
    },
  },
  namespaces: {
    default: {
      isLogged: true,
    },
  },
};

const logger = createLogger(config);
logger.default.log("Hello world, here a smart fox log");
  • Run the script, it should output a namespaces log
2.0.13

3 years ago

2.0.14

3 years ago

2.0.12

3 years ago

2.0.11

3 years ago

2.0.10

3 years ago

2.0.9

3 years ago

2.0.8

3 years ago

2.0.7

3 years ago

2.0.6

3 years ago

2.0.5

3 years ago

2.0.4

3 years ago

2.0.3

3 years ago

2.0.2

3 years ago

2.0.1

3 years ago

2.0.0

3 years ago

1.0.4

3 years ago

1.0.3

3 years ago

1.0.2

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago

0.0.9

3 years ago

0.0.8

3 years ago

0.0.7

3 years ago

0.0.6

3 years ago

0.0.5

3 years ago

0.0.4

3 years ago

0.0.3

3 years ago

0.0.2

3 years ago

0.0.1

3 years ago