log-filter
v2.0.0
Published
Filter server logs simply
Downloads
2
Readme
log-filter
Installation
npm install -g log-filter
Usage
log-filter [--contain -c KEYWORD] [--match -m REG_EXP] [--not -n]
--contain, -c
echo 'warn: It is warning' | log-filter --contain warn
warn: It is warning
echo 'warn: It is warning' | log-filter --contain error # Not displayed
--match, -m
echo 'warn: It is warning' | log-filter --match '(warn|error)'
warn: It is warning
echo 'warn: It is warning' | log-filter --match '^warning' # Not displayed
- Note:
--match
is priority than--contain
.
--not, -n
echo 'warn: It is warning' | log-filter --contain error --not
warn: It is warning
echo 'warn: It is warning' | log-filter --contain warn --not # Not displayed
Examples
npm run start-your-server | log-filter -n -m 'log pattern that you do not like reading'