coreos / mayday

A diagnostics tool for capturing system state.
Apache License 2.0
80 stars 27 forks source link

add cli arg for setting output file #48

Closed tschuy closed 7 years ago

tschuy commented 8 years ago

Super simple arg.

Currently, this will overwrite the file if you present a file that already exists. Personally, I like this as the dev, it makes testing as easy as --output=/tmp/mayday.tar.gz and suddenly I don't have to deal with a billion 1.5MB files cramming my temp space. (if you only care about the log, setting it to /dev/null also works!) However, I don't know if this is ideal for actual usage.

Thoughts? If that's alright, then I think this is pretty much good to go.

tschuy commented 8 years ago

should we also let people include the date and hostname in their custom names with placeholders like {hostname} and {time}?

EDIT: I also set the default hostname, if it errors, to unknownhost, since this doesn't seem like the kind of thing we need to prompt the user about happening.

tschuy commented 8 years ago

Fixes #42

mischief commented 7 years ago

@tschuy if someone wants to use the hostname/time, they can do mayday -o mayday-$(hostname)-$(date -u +%s).tar.gz or something like that.

LGTM

brianredbeard commented 7 years ago

Concur. LGTM.

LGTM