logagent-js
Advanced tools
Comparing version 1.2.18 to 1.2.19
@@ -48,3 +48,3 @@ #!/bin/sh | ||
.option('-e, --elasticsearch-host <url>', 'elasticsearch url') | ||
.option('-n, --name <logSourceName>', 'name stdin log source to find patterns e.g. -n nginx to match nginx patterns') | ||
.option('-n, --name <logSourceName>', 'name stdin log source to find patterns e.g. -n nginx to match nginx patterns', function (n) {argv.sourceName=n}) | ||
.option('-g, --glob <globPattern>', 'glob pattern to match file names') | ||
@@ -395,3 +395,3 @@ .option('-s, --suppress', 'supress output of parsed log lines') | ||
if (argv.index) { | ||
logToLogsene(logseneToken, data['_type'] || argv.name || 'logs', data) | ||
logToLogsene(logseneToken, data['_type'] || argv.sourceName || 'logs', data) | ||
} | ||
@@ -408,3 +408,3 @@ if (argv['rtailPort']) { | ||
content: data.message, | ||
id: type || argv.name || 'logs' | ||
id: type || argv.sourceName || 'logs' | ||
})) | ||
@@ -443,3 +443,3 @@ udpClient.send(message, 0, message.length, argv['rtailPort'], argv['rtailHost'] || 'localhost', function (err) { | ||
la.parseLine(line.replace(removeAnsiColor, ''), | ||
argv.name || sourceName, cbf || log) | ||
argv.sourceName || sourceName, cbf || log) | ||
} | ||
@@ -446,0 +446,0 @@ |
{ | ||
"name": "logagent-js", | ||
"version": "1.2.18", | ||
"version": "1.2.19", | ||
"description": "Smart log parser written in Node", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
1122076
62