Skip to content

Commit

Permalink
Merge branch 'release/0.2.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
jsumners committed May 24, 2016
2 parents f21c57a + 5218088 commit ce576fd
Show file tree
Hide file tree
Showing 9 changed files with 262 additions and 431 deletions.
267 changes: 0 additions & 267 deletions .eslintrc.js

This file was deleted.

7 changes: 6 additions & 1 deletion Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ This module provides a "transport" for [pino][pino] that simply forwards
messages to an arbitrary socket. The socket can be UDPv4 or TCPv4. The module
can echo the received logs or work silently.

You should install install `pino-socket` globally for ease of use:
You should install `pino-socket` globally for ease of use:

```bash
$ npm install --production -g pino-socket
Expand All @@ -29,6 +29,11 @@ $ node foo | pino-socket -a 10.10.10.5 -p 5000
+ `--port` (`-p`): the port for the destination socket. Default: `514`.
+ `--echo` (`-e`): echo the received messages to stdout. Default: enabled.
+ `--no-echo` (`-ne`): disable echoing received messages to stdout.
+ `--cee` (`-c`): prefix the message with `@cee: ` for [rsyslog cee][rsyscee]
support. Default: disabled.
+ `--no-cee` (`-nc`): explicitly disable CEE prefixing

[rsyscee]: http://www.rsyslog.com/doc/mmjsonparse.html

## License

Expand Down
12 changes: 6 additions & 6 deletions app.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
#!/usr/bin/env node
'use strict';
'use strict'

const path = require('path');
const fs = require('fs');
const realPath = fs.realpathSync(__dirname);
const script = path.join(realPath, 'psock.js');
const path = require('path')
const fs = require('fs')
const realPath = fs.realpathSync(__dirname)
const script = path.join(realPath, 'psock.js')

require(script.toString());
require(script.toString())
7 changes: 7 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
### 0.2.0
+ Correct documentation
+ Switch to [standardjs.com][sjs] code style
+ Add `--cee` switch to prefix sent messages with `@cee: `
+ Ensure local echo and socket sends are asynchronous

[sjs]: http://standardjs.com/
36 changes: 17 additions & 19 deletions gulpfile.js
Original file line number Diff line number Diff line change
@@ -1,35 +1,33 @@
'use strict';
'use strict'

const gulp = require('gulp');
const $ = require('gulp-load-plugins')();
const gulp = require('gulp')
const $ = require('gulp-load-plugins')()

const srcIncludes = [
'**/*.js',
'!node_modules/**',
'!coverage/**',
'!test/**' // tests can be wonky
];
'!coverage/**'
]

gulp.task('lint', function lintTask() {
gulp.task('lint', function lintTask () {
return gulp
.src(srcIncludes)
.pipe($.eslint())
.pipe($.eslint.formatEach())
.pipe($.eslint.failAfterError());
});
.pipe($.standard())
.pipe($.standard.reporter('default', { breakOnError: true }))
})

gulp.task('pre-test', function preTest() {
gulp.task('pre-test', function preTest () {
return gulp
.src(srcIncludes)
.src(srcIncludes.concat(['!test/**']))
.pipe($.istanbul())
.pipe($.istanbul.hookRequire());
});
.pipe($.istanbul.hookRequire())
})

gulp.task('test', ['lint', 'pre-test'], function testTask() {
gulp.task('test', ['lint', 'pre-test'], function testTask () {
return gulp
.src(['test/*.js'])
.pipe($.mocha({ui: 'qunit', reporter: 'min'}))
.pipe($.istanbul.writeReports());
});
.pipe($.istanbul.writeReports())
})

gulp.task('default', ['test']);
gulp.task('default', ['test'])
8 changes: 5 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "pino-socket",
"version": "0.1.2",
"version": "0.2.0",
"description": "A pino 'transport' for writing to a tcp or udp socket",
"homepage": "https://github.com/jsumners/pino-socket",
"bugs": "https://github.com/jsumners/pino-socket/issues",
Expand All @@ -27,13 +27,15 @@
"eslint-plugin-promise": "^1.1.0",
"eslint-plugin-standard": "^1.3.2",
"gulp": "^3.9.1",
"gulp-eslint": "^2.0.0",
"gulp-istanbul": "^0.10.4",
"gulp-load-plugins": "^1.2.2",
"gulp-mocha": "^2.2.0",
"gulp-standard": "^7.0.1",
"istanbul": "^0.4.3",
"mocha": "^2.4.5",
"pino": "^2.4.0"
"pino": "^2.4.0",
"pre-commit": "^1.1.3",
"standard": "^7.1.0"
},
"dependencies": {
"nopt": "^3.0.6",
Expand Down
Loading

0 comments on commit ce576fd

Please sign in to comment.