Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/kjirou/log-filter
Filter server logs simply
https://github.com/kjirou/log-filter
Last synced: 14 days ago
JSON representation
Filter server logs simply
- Host: GitHub
- URL: https://github.com/kjirou/log-filter
- Owner: kjirou
- License: mit
- Created: 2015-02-23T03:08:44.000Z (almost 10 years ago)
- Default Branch: master
- Last Pushed: 2021-08-31T10:52:03.000Z (over 3 years ago)
- Last Synced: 2024-12-07T16:37:41.625Z (21 days ago)
- Language: JavaScript
- Homepage:
- Size: 7.81 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# log-filter [![npm version](https://badge.fury.io/js/log-filter.svg)](http://badge.fury.io/js/log-filter)
## Installation
```bash
npm install -g log-filter
```## Usage
```bash
log-filter [--contain -c KEYWORD] [--match -m REG_EXP] [--not -n]
```### --contain, -c
```bash
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
```bash
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
```bash
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
```bash
npm run start-your-server | log-filter -n -m 'log pattern that you do not want reading'
```