testarmada-logger
logger for testarmada family
Last updated a month ago by mnamoff .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install testarmada-logger 
SYNC missed versions from official npm registry.

logger

Build Status License: MIT codecov

a simple logger to keep all logs of testarmada repos in the same format

How to use

import logger from "testarmada-logger";

logger.prefix = "SOME_PREFERRED_PREFIX";

logger.log("this", "is", "a", "thing");
// output: [INFO] [SOME_PREFERRED_PREFIX] this, is, a, thing

logger.warn("something");
// output: [WARN] [SOME_PREFERRED_PREFIX] something

logger.err("something");
// output: [ERROR] [SOME_PREFERRED_PREFIX] something

logger.loghelp("print help of your module");
// output: print help of your module

logger.debug("debug infomation");
// output [DEBUG] [SOME_PREFERRED_PREFIX] debug infomation

Enable debug

Debug mode can be enabled by

  1. Add TESTARMADA_LOGGER_DEBUG=true as env variable, or
  2. Add --debug to your command

License

Documentation in this project is licensed under Creative Commons Attribution 4.0 International License. Full details available at https://creativecommons.org/licenses/by/4.0

Current Tags

  • 1.2.2                                ...           latest (a month ago)

8 Versions

  • 1.2.2                                ...           a month ago
  • 1.2.1                                ...           2 years ago
  • 1.2.0                                ...           2 years ago
  • 1.1.1                                ...           4 years ago
  • 1.1.0                                ...           4 years ago
  • 1.0.0                                ...           4 years ago
  • 1.0.0-beta2                                ...           4 years ago
  • 1.0.0-beta1                                ...           4 years ago

Copyright 2014 - 2016 © taobao.org |