You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

README.md 2.0KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. <p align="center">
  2. <a href="http://gulpjs.com">
  3. <img height="257" width="114" src="https://raw.githubusercontent.com/gulpjs/artwork/master/gulp-2x.png">
  4. </a>
  5. </p>
  6. # fancy-log
  7. [![NPM version][npm-image]][npm-url] [![Downloads][downloads-image]][npm-url] [![Travis Build Status][travis-image]][travis-url] [![AppVeyor Build Status][appveyor-image]][appveyor-url] [![Coveralls Status][coveralls-image]][coveralls-url] [![Gitter chat][gitter-image]][gitter-url]
  8. Log things, prefixed with a timestamp.
  9. ## Usage
  10. ```js
  11. var log = require('fancy-log');
  12. log('a message');
  13. // [16:27:02] a message
  14. log.error('oh no!');
  15. // [16:27:02] oh no!
  16. ```
  17. ## API
  18. ### `log(msg...)`
  19. Logs the message as if you called `console.log` but prefixes the output with the
  20. current time in HH:MM:ss format.
  21. ### `log.error(msg...)`
  22. Logs the message as if you called `console.error` but prefixes the output with the
  23. current time in HH:MM:ss format.
  24. ### `log.warn(msg...)`
  25. Logs the message as if you called `console.warn` but prefixes the output with the
  26. current time in HH:MM:ss format.
  27. ### `log.info(msg...)`
  28. Logs the message as if you called `console.info` but prefixes the output with the
  29. current time in HH:MM:ss format.
  30. ### `log.dir(msg...)`
  31. Logs the message as if you called `console.dir` but prefixes the output with the
  32. current time in HH:MM:ss format.
  33. ## License
  34. MIT
  35. [downloads-image]: http://img.shields.io/npm/dm/fancy-log.svg
  36. [npm-url]: https://www.npmjs.com/package/fancy-log
  37. [npm-image]: http://img.shields.io/npm/v/fancy-log.svg
  38. [travis-url]: https://travis-ci.org/gulpjs/fancy-log
  39. [travis-image]: http://img.shields.io/travis/gulpjs/fancy-log.svg?label=travis-ci
  40. [appveyor-url]: https://ci.appveyor.com/project/gulpjs/fancy-log
  41. [appveyor-image]: https://img.shields.io/appveyor/ci/gulpjs/fancy-log.svg?label=appveyor
  42. [coveralls-url]: https://coveralls.io/r/gulpjs/fancy-log
  43. [coveralls-image]: http://img.shields.io/coveralls/gulpjs/fancy-log/master.svg
  44. [gitter-url]: https://gitter.im/gulpjs/gulp
  45. [gitter-image]: https://badges.gitter.im/gulpjs/gulp.svg