Skip to content

Commit

Permalink
Some extra documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
Sarvesh Chitko committed Feb 26, 2019
1 parent 75bd48d commit b7fff78
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 10 deletions.
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,11 @@ The class that does transmission of logs using the WebSockets
##### new LogstashTransport()
The main class that adds the Logstash capabilities to Winston

**Throws**:

- UnsupportedInputError
- InvalidParametersError

<a name="module_LogstashTransport--module.exports..log"></a>

#### module.exports~log(info, callback)
Expand Down
2 changes: 1 addition & 1 deletion dist/index-min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
* @author Sarvesh Chitko ([email protected])
*/
const winston = require("winston")
const UDPInput = require("./UDPInput.class")
const TCPInput = require("./TCPInput.class")
const WebSocketInput = require("./WebSocketInput.class")
const HTTPInput = require("./HTTPInput.class")
const UDPInput = require("./UDPInput.class-min")
const TCPInput = require("./TCPInput.class-min")
const WebSocketInput = require("./WebSocketInput.class-min")
const HTTPInput = require("./HTTPInput.class-min")
/**
* @class LogstashTransport
* @extends Transport
Expand Down
5 changes: 2 additions & 3 deletions gulpfile.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
const { gulp,parallel,src,dest } = require("gulp")
const concat = require("gulp-concat")
const minify = require("gulp-minify")
function combineClasses(cb){
src("src/*.class.js").pipe(minify()).pipe(dest("./dist/"))
cb()
}
function uglifyMain(cb){
function minifyMain(cb){
src("src/index.js").pipe(minify()).pipe(dest("./dist/"))
cb()
}
exports.default = parallel(combineClasses,uglifyMain)
exports.default = parallel(combineClasses,minifyMain)
6 changes: 4 additions & 2 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,17 @@ const UDPInput = require("./UDPInput.class-min")
const TCPInput = require("./TCPInput.class-min")
const WebSocketInput = require("./WebSocketInput.class-min")
const HTTPInput = require("./HTTPInput.class-min")

module.exports =
/**
* @class LogstashTransport
* @extends Transport
* @desc The main class that adds the Logstash capabilities to Winston
* @throws UnsupportedInputError
* @throws InvalidParametersError
*/
module.exports =
class LogstashTransport extends winston.Transport {
/**
*
* @param {Object} options - The Configuration object
* @param {String} options.name - The name of the transport
* @param {String} options.input - The input that you want to use
Expand Down

0 comments on commit b7fff78

Please sign in to comment.