Skip to content

Commit

Permalink
More doc
Browse files Browse the repository at this point in the history
  • Loading branch information
hmalphettes committed May 23, 2013
1 parent bf70b02 commit 710c27b
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,11 @@ Usage: log4js configuration
}
});

Usage: advanced
---------------
Usage: custom
-------------

var log4js = require('log4js');
var uuid = require('node-uuid');
log4js.configure({
"appenders": [
"appender": {
Expand All @@ -65,7 +66,12 @@ Usage: advanced
return loggingEvent.level.levelStr;
},
"url": "http://127.0.0.1:9200",
"layout": {
"logId": function(loggingEvent) {
return uuid.v4();
},
"buffersize": 1024,
"timeout": 45000,
"layout": {
"type": "logstash",
"tags": [ "mytag" ],
"sourceHost": function(loggingEvent) {
Expand Down Expand Up @@ -107,6 +113,9 @@ Default: 256
- `timeout`: number of milliseconds to wait until the logs buffer is posted to elasticsearch; regardless of its size.
Default: 30 seconds.

- `logId`: function that returns the value of the `_id` of the logging event.
Default: undefined to let elasticsearch generate it.

Additional Built-in layouts
============================

Expand Down

0 comments on commit 710c27b

Please sign in to comment.