Initial commit
[yaffs-website] / node_modules / gulplog / README.md
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
7 # gulplog
8
9 [![NPM version][npm-image]][npm-url] [![Downloads][downloads-image]][npm-url] [![Build Status][travis-image]][travis-url] [![Gitter chat][gitter-image]][gitter-url]
10
11 Logger for gulp and gulp plugins
12
13 ## Usage
14
15 ```js
16 var logger = require('gulplog');
17
18 // logs strings
19 logger.debug('The MOST verbose!');
20 logger.info('Some important info');
21 logger.warn('All the warnings to you');
22 logger.error('OH NO! SOMETHING HAPPENED!');
23
24 // supports util.format!
25 logger.info('%s style!', 'printf');
26
27 // log anything
28 logger.debug({ my: 'obj' });
29 logger.info([1, 2, 3]);
30 ```
31
32 ## API
33
34 Logging (and level of logging) is controlled by [`gulp-cli`][gulp-cli-url]
35
36 #### logger.debug(msg)
37
38 Highest log level.  Typically used for debugging purposes.
39
40 If the first argument is a string, all arguments are passed to node's
41 [`util.format()`][util-format-url] before being emitted.
42
43 #### logger.info(msg)
44
45 Standard log level.  Typically used for user information.
46
47 If the first argument is a string, all arguments are passed to node's
48 [`util.format()`][util-format-url] before being emitted.
49
50 #### logger.warn(msg)
51
52 Warning log level.  Typically used for warnings.
53
54 If the first argument is a string, all arguments are passed to node's
55 [`util.format()`][util-format-url] before being emitted.
56
57 #### logger.error(msg)
58
59 Error log level.  Typically used when things went horribly wrong.
60
61 If the first argument is a string, all arguments are passed to node's
62 [`util.format()`][util-format-url] before being emitted.
63
64 ## License
65
66 MIT
67
68 [downloads-image]: http://img.shields.io/npm/dm/gulplog.svg
69 [npm-url]: https://npmjs.org/package/gulplog
70 [npm-image]: http://img.shields.io/npm/v/gulplog.svg
71
72 [travis-url]: https://travis-ci.org/gulpjs/gulplog
73 [travis-image]: http://img.shields.io/travis/gulpjs/gulplog.svg
74
75 [gitter-url]: https://gitter.im/gulpjs/gulp
76 [gitter-image]: https://badges.gitter.im/gulpjs/gulp.png
77
78 [gulp-cli-url]: https://github.com/gulpjs/gulp-cli
79 [util-format-url]: https://nodejs.org/docs/latest/api/util.html#util_util_format_format