8000 added description for using dependancies · ThinkLib/log4js-node@169627a · GitHub
[go: up one dir, main page]

Skip to content

Commit 169627a

Browse files
committed
added description for using dependancies
1 parent 658f7c4 commit 169627a

File tree

1 file changed

+16
-6
lines changed

1 file changed

+16
-6
lines changed

lib/appenders/logFacesAppender.js

Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,15 @@
1+
/**
2+
* logFaces appender sends JSON formatted log events to logFaces receivers.
3+
* There are two types of receivers supported - raw UDP sockets (for server side apps),
4+
* and HTTP (for client side apps). Depending on the usage, this appender
5+
* requires either of the two:
6+
*
7+
* For UDP require 'dgram', see 'https://nodejs.org/api/dgram.html'
8+
* For HTTP require 'axios', see 'https://www.npmjs.com/package/axios'
9+
*
10+
* Make sure your project have relevant dependancy installed before using this appender.
11+
*/
12+
113
"use strict";
214
var util = require('util');
315
var context = {};
@@ -41,21 +53,19 @@ function servlet(config){
4153
}
4254

4355
/**
44-
* logFaces appender sends JSON formatted log events to logFaces receivers.
45-
* There are two types of receivers targetted - raw UDP sockets and HTTP.
4656
* For UDP (node.js) use the following c 9EC1 onfiguration params:
4757
* {
48-
* "type": "logFacesAppender",
58+
* "type": "logFacesAppender", // must be present for instantiation
4959
* "application": "LFS-TEST", // name of the application (domain)
5060
* "remoteHost": "127.0.0.1", // logFaces server address (hostname)
5161
* "port": 55201 // UDP receiver listening port
5262
* }
5363
*
5464
* For HTTP (browsers or node.js) use the following configuration params:
5565
* {
56-
* "type": "logFacesAppender",
57-
* "application": "LFS-TEST", // name of the application (domain)
58-
* "url": "http://lfs-server/..", // logFaces receiver binding name
66+
* "type": "logFacesAppender", // must be present for instantiation
67+
* "application": "LFS-TEST", // name of the application (domain)
68+
* "url": "http://lfs-server/logs", // logFaces receiver servlet URL
5969
* }
6070
*/
6171
function logFacesAppender(config) {

0 commit comments

Comments
 (0)
0