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
Be more clear in --help what the value of --log is supposed to be #184
Conversation
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.
LGTM. Thanks for the cleanup.
Huh, so a filename is expected… I was wondering what the … but it doesn’t work with a filename either:
|
That's a special file, try a regular file that you have permissions to create and write to? For me, though, it also works with this special /dev "file": |
@lgommans I need it on stdout though, so it can be combined with the rest of the output into the service manager’s logging (and timestamping and rotating) system (here: DJB dæmontools) A separate actual file is no option. (Ideally, they’d allow |
Might it be that you're not running it from bash or a similar shell and If that's the case, maybe run it with (The above occurred to me while I was actually typing that I can't reproduce your issue so I wasn't sure how to further help without further information. If this missing stdout 'device' isn't it, then you'll have to give more info.) |
The link does exist, but I suspect that, as soon as stdout is piped to somewhere, the opening fails, because:
(from I guess it opens for more than appending? |
Hm, no, it isn’t even that.
|
--log sets the server.Log option. When searching for use of server.Log, it shows up in mux.go#L95. The next line calls into a function defined earlier in the file and there the next line contains the file open options. The code base is not that large. I often have trouble navigating established (read: large) projects in languages which I'm not very familiar with, but this project is imo quite accessible so I figured I'd show how I approached this :). At any rate, the call looks like this:
Since that works fine for me, I'm not sure if/how this helps, though. Maybe you know more about this. |
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
|
Currently,
--help
says:I looked through the documentation and even gave the source code a glance to find what this "string" is supposed to be, which options exist? I just want it to dump the URI or something, whatever the syntax is for that in this combined format, why is an argument even required and can't I use some default?
Some
%s
-like guesses later and not seeing any log messages at all upon doing requests to the server, I moved on and did anls
for unrelated reasons, finding that it had created my attempts as filenames. Aha, it has to be a filename! It doesn't simply log to stdout!This pull request hopefully makes that more clear for those who come after me. I found it hard to find good phrasing without making it overly long. I'd actually rather replace the word "string" with "filename" (or just "file") and leave the rest as-is, but I'm not sure if that's possible without overcomplicating things.
The proposed change would appear as:
The
--no-verify-upload
option is the only one that is still (significantly) longer, but it's also a bit of an exception so that's not a great measure.(If a changelog entry is needed for this change, just let me now. I've marked it as not applicable in the checklist because it seems too trivial for an entry.)
Checklist
changelog/unreleased/
that describes the changes for our users (template here)gofmt
on the code in all commits