logger-request-cli
v1.5.0
Published
parser for logger request
Downloads
14
Readme
logger-request-cli
Parser for Logger request
.
Show output to console.
Installation
Install through NPM
npm install -g logger-request-cli
or
git clone git://github.com/hex7c0/logger-request-cli.git
API
global parser with -g
option
$ logger-request -h
Usage:
logger-request [OPTIONS] [ARGS]
Options:
--filename FILE Pathname of the log file to be read
-i, --ip Parse ip
-u, --url Parse url
-r, --reponse Parse time of response
-p, --pid Parse pid
-q, --bytesReq Parse bytesReq
-s, --bytesRes Parse bytesRes
-e, --referrer Parse referrer
-a, --auth Parse basic-authentication
-u, --agent Parse user agent
-w, --w3c Parse http version
-l, --level Parse log level
-m, --message Parse log message
-t, --timestamp Parse log timestamp
-R, --report Not print filename stats
--csv STRING Write results to csv file
--search STRING Search string inside logfile
-v, --version Display the current version
-h, --help Display help and usage details
$ logger-request -u A.log
$ logger-request --csv a.csv A.log
$ logger-request --search monitode A.log
inside nodejs project
var parser = require('logger-request-cli');
parser({
filename: 'A.log',
bytesReq: true
});
parser(options)
options
filename
- String Pathname of the logfile to be read (default "null")ip
- Boolean Flag forreq.ip
(default "disabled")url
- Boolean Flag forreq.url
(default "disabled")response
- Boolean Flag fortime of response
(default "disabled")pid
- Boolean Flag forprocess.pid
(default "disabled")bytesReq
- Boolean Flag forreq.socket.bytesRead
(default "disabled")bytesRes
- Boolean Flag forreq.socket._bytesDispatched
(default "disabled")referrer
- Boolean Flag forreq.headers['referrer']
(default "disabled")auth
- Boolean Flag forbasic-authentication
(default "disabled")agent
- Boolean Flag forreq.headers['user-agent']
(default "disabled")version
- Boolean Flag forreq.httpVersionMajor
(default "disabled")level
- Boolean Flag forlog level
(default "disabled")message
- Boolean Flag forlog message
(default "disabled")timestamp
- Boolean Flag forlog timestamp
(default "disabled")csv
- String Write parsed object to csv file (default "disabled")search
- String Search string inside logfile (default "disabled")report
- Boolean Flag forfilename stats
(default "enabled")
Examples
Take a look at my examples