gulp-log-line

1.0.1 • Public • Published

Gulp log-line

Build Status

Log file and line number without the extra cost of reading the stack.

Usage

var gulp = require('gulp');
var logLine = require('gulp-log-line');
gulp.task('line-log', function() {
    return gulp.src("file.js", {buffer : true})
    //Write here the loggers you use.
        .pipe(logLine(['console.log', 'winston.info']))
        .pipe(gulp.dest('./build'))

})

gulp.task('default', ['line-log'])

Example

file.js

console.log('First log')
var someVariable
console.log('Second log')

Becomes

file.js

console.log('file.js:1', 'First log')
var someVariable
console.log('file.js:3', 'Second log')

Package Sidebar

Install

npm i gulp-log-line

Weekly Downloads

4

Version

1.0.1

License

MIT

Last publish

Collaborators

  • furstenheim