Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add --delim custom delimiter option #17

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

luckman212
Copy link

Hey @zmwangx 👋

Ets is an awesome tool, thank you for creating it! It's really helping me debug some stuff that needed millisecond-level accuracy in the timestamps.

One problem that I had was the delimiter of a single space was making it hard to integrate with some other logging tools that I also use. I wanted to use \t tab instead, but I went ahead and made this PR that adds a -d / --delim flag to allow any custom delimiter that might be desired.

Examples

ets --delim ' - '
ets -d '\t\t'
ets -d ':  '

One little neat trick you can do with this is create a delimiter that causes the terminal to beep when new lines are logged, e.g.

$ ping 1.1.1.1 | ets -d '\t\x07'

Hope this patch is ok, but let me know 👍

@gdubicki
Copy link

Hey @luckman212, please read #37. I would be happy to try to get your PR merged to that fork, if you recreate it there. :)

@luckman212
Copy link
Author

@gdubicki Glad to see you've forked and are planning to maintain this! I dusted off the PR and applied it to your fork. I haven't tested yet whether it compiles but glancing at the diff it seems "ok". I will try to build and test later.

@luckman212 luckman212 force-pushed the add-custom-delimiter branch from 6d6ad16 to 20bb4b1 Compare April 29, 2024 20:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants