Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/furstenheim/gulp-log-line
Add file path and line to your logs
https://github.com/furstenheim/gulp-log-line
Last synced: 29 days ago
JSON representation
Add file path and line to your logs
- Host: GitHub
- URL: https://github.com/furstenheim/gulp-log-line
- Owner: furstenheim
- Created: 2016-05-15T09:40:58.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2016-05-18T20:00:13.000Z (over 8 years ago)
- Last Synced: 2024-10-29T21:03:05.718Z (3 months ago)
- Language: JavaScript
- Size: 7.81 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
#Gulp log-line
[![Build Status](https://travis-ci.org/furstenheim/gulp-log-line.svg?branch=master)](https://travis-ci.org/furstenheim/gulp-log-line)
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')
```