added description for using dependancies

This commit is contained in:
sparklton 2016-11-06 08:45:19 +02:00
parent 658f7c45c7
commit 169627a464

View File

@ -1,3 +1,15 @@
/**
* logFaces appender sends JSON formatted log events to logFaces receivers.
* There are two types of receivers supported - raw UDP sockets (for server side apps),
* and HTTP (for client side apps). Depending on the usage, this appender
* requires either of the two:
*
* For UDP require 'dgram', see 'https://nodejs.org/api/dgram.html'
* For HTTP require 'axios', see 'https://www.npmjs.com/package/axios'
*
* Make sure your project have relevant dependancy installed before using this appender.
*/
"use strict";
var util = require('util');
var context = {};
@ -41,11 +53,9 @@ function servlet(config){
}
/**
* logFaces appender sends JSON formatted log events to logFaces receivers.
* There are two types of receivers targetted - raw UDP sockets and HTTP.
* For UDP (node.js) use the following configuration params:
* {
* "type": "logFacesAppender",
* "type": "logFacesAppender", // must be present for instantiation
* "application": "LFS-TEST", // name of the application (domain)
* "remoteHost": "127.0.0.1", // logFaces server address (hostname)
* "port": 55201 // UDP receiver listening port
@ -53,9 +63,9 @@ function servlet(config){
*
* For HTTP (browsers or node.js) use the following configuration params:
* {
* "type": "logFacesAppender",
* "application": "LFS-TEST", // name of the application (domain)
* "url": "http://lfs-server/..", // logFaces receiver binding name
* "type": "logFacesAppender", // must be present for instantiation
* "application": "LFS-TEST", // name of the application (domain)
* "url": "http://lfs-server/logs", // logFaces receiver servlet URL
* }
*/
function logFacesAppender(config) {