-
Notifications
You must be signed in to change notification settings - Fork 42
cli: -stdout option for process inspector #154
Conversation
PTAL @AkihiroSuda |
@@ -44,6 +46,7 @@ func init() { | |||
procFlagset.IntVar(&_procFlags.RootPID, "pid", -1, "PID for the target process tree") | |||
procFlagset.DurationVar(&_procFlags.WatchInterval, "watch-interval", 1*time.Second, "Watching interval") | |||
procFlagset.StringVar(&_procFlags.Cmd, "cmd", "", "Command for target process") | |||
procFlagset.StringVar(&_procFlags.Stdout, "stdout", "", "Stdout for target process (used if -cmd option is given)") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think -cmd-stdout
is much more descriptive.
If you feel -cmd-stdout
is too long, I'm +1 for keeping -stdout
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We need -stderr
as well
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
added -stderr
. I think -cmd-stdout
is too long because the option is only used with -cmd
and it is described in the help message.
Thank you a lot for working on this! |
@AkihiroSuda thanks for review, updated for the above comment, PTAL. |
@@ -44,6 +47,8 @@ func init() { | |||
procFlagset.IntVar(&_procFlags.RootPID, "pid", -1, "PID for the target process tree") | |||
procFlagset.DurationVar(&_procFlags.WatchInterval, "watch-interval", 1*time.Second, "Watching interval") | |||
procFlagset.StringVar(&_procFlags.Cmd, "cmd", "", "Command for target process") | |||
procFlagset.StringVar(&_procFlags.Stdout, "stdout", "", "Stdout for target process (used if -cmd option is given)") | |||
procFlagset.StringVar(&_procFlags.Stderr, "stderr", "", "Stdout for target process (used if -cmd option is given)") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the help string is still "Stdout..""
@mitake Thank you, please fix the small nit about the help string? |
This commit adds a new option -stdout to process inspector (-cmd mode). A given path will be used for storing stdout of the target process. If the path isn't given, os.Stdout will be used. -stderr does same thing for os.Stderr.
@AkihiroSuda ah sorry for that, fixed it, PTAL. |
Thank you, merged |
Release Note: http://osrg.github.io/namazu/post/release-0-2-1/ Changes from v0.2.0: * #167, #168, #169, #170: doc: miscellaneous improvements * #166: vendor go packages * #163: *: bump up Go to 1.7 * #162: container: add support for inspectors/fs * #160: inspectors/fs: implement Fsync * #158, #159: inspectors/fs: improved CLI (thank you @v01dstar !) * #156: inspectors/proc: improved error handling * #154, #155: inspectors/proc: improved CLI Signed-off-by: Akihiro Suda <suda.akihiro@lab.ntt.co.jp>
Release Note: http://osrg.github.io/namazu/post/release-0-2-1/ Changes from v0.2.0: * #167, #168, #169, #170: doc: miscellaneous improvements * #166: vendor go packages * #163: *: bump up Go to 1.7 * #162: container: add support for inspectors/fs * #160: inspectors/fs: implement Fsync * #158, #159: inspectors/fs: improved CLI (thank you @v01dstar !) * #156: inspectors/proc: improved error handling * #154, #155: inspectors/proc: improved CLI Signed-off-by: Akihiro Suda <suda.akihiro@lab.ntt.co.jp>
This commit adds a new option -stdout to process inspector (-cmd
mode). A given path will be used for storing stdout of the target
process. If the path isn't given, os.Stdout will be used.
Fixes #152