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

Select log file to open with --open/-o #7

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

OliverUv
Copy link

@OliverUv OliverUv commented Sep 7, 2018

deoptigate -o some_named_log_file.log now works, as well as --open.

It's nice to be able to name my log files whatever I want.

@thlorenz
Copy link
Owner

thlorenz commented Sep 7, 2018

Thanks for the idea, but what's wrong with selecting the file from the list?
I'd like to keep the tool as easy to use as possible and that also means having the least amount of flags if avoidable.

@OliverUv
Copy link
Author

OliverUv commented Sep 8, 2018

  1. I have a file manager that lets me sort logs by date. I want to use its functionality to easily select the log file I want to open. I don't want to implement this functionality in files-provider as it's already solved well by another tool. (files-provider also appears to want to be a minimal lib, so I'm not feeling comfortable adding tons of new options to it. Nor do I want to spend the time doing so.)

  2. I want to name my log files so I can easily do comparisons between versions when writing blog posts. /^(isolate-.+-)?v8.log$/ leaves some room for me to add my own metadata, I guess, but it's a bother.

I suppose in general I'm just used to programs allowing me to specify which file I want them to open, without having to use their non-standard UIs. Unix philosophy and whatnot.

@@ -34,6 +34,10 @@ deoptigate -- node --allow-natives-syntax app.js

Simply run `deoptigate` from the directory that contains the log file(s).

### Deoptigate existing `*.log`

Run `deoptigate --open path/to/file.log`. You may also use `-o`.
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's just add this to the above section, i.e.

Simply run deoptigate from the directory that contains the log file(s) or specify a specific file via --open|-o, i.e. deoptigate --open path/to/file.log.

@thlorenz
Copy link
Owner

OK, I get your point, let's add this in, but I'd like you to use minimist since more flags may be added in the future and parsing by hand is not the way to go.

See some example use inside docme. Don't worry about printing usage for now.

@thlorenz thlorenz force-pushed the master branch 5 times, most recently from 16ea722 to 2853130 Compare November 28, 2018 19:21
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