Skip to content
This repository has been archived by the owner on Apr 26, 2020. It is now read-only.

Enhancement request: more filters in one process #3

Open
kseistrup opened this issue Jan 15, 2014 · 3 comments
Open

Enhancement request: more filters in one process #3

kseistrup opened this issue Jan 15, 2014 · 3 comments

Comments

@kseistrup
Copy link

It would be more useful if it was possible to add more filters to one em instance, e.g.:

$ tail -f debug.log | em "ERROR" red "WARNING" yellow

or

$ tail -f debug.log | em --red "ERROR" --yellow "WARNING"
@ikalnytskyi
Copy link
Owner

I plan to implement it, but currently you can achieve this functionality by using Unix pipes:

$ tail -f debug.log | em "ERROR" red | em "WARNING" yellow

@kseistrup
Copy link
Author

Yes, I'm aware about piping, but it seems a little overkill to run another pipe for each color — hence my suggestion.

@ikalnytskyi
Copy link
Owner

but it seems a little overkill to run another pipe for each color

Why? It's a Unix way. For instance we use grep this way too:

$ tail -f /path/to/log | grep "pattern1" | grep "pattern2"

Performance and memory usage are only reasons I want to implement more filters. :)
So stay in touch, it will be in next release.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants