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
log: Colon missing from standard format log messages. #9448
Comments
I'm not sure that we should change the behaviour now, as people might be parsing the log output and it would be rude to change it under them. Perhaps the comment should be updated? I suspect @robpike wrote it in the first place. Rob? |
On 29/12/2014, at 12:21 pm, Andrew Gerrand notifications@github.com wrote:
Cheers, |
Just sent https://go-review.googlesource.com/2088 to update the doc comment On 30 December 2014 at 06:24, lparkes notifications@github.com wrote:
|
The documentation for the log packages states that the flag controlled items printed out in each log message are always followed by a colon, but this only seems to be the case if the flags Llongfile or Lshortfile are specified.
What version of Go are you using (go version)?
castigate:~ lloyd$ go version
go version go1.4 darwin/amd64
What operating system and processor architecture are you using?
castigate:~ lloyd$ uname -a
Darwin castigate.must-have-coffee.gen.nz 13.4.0 Darwin Kernel Version 13.4.0: Wed Dec 24 20:21:41 NZDT 201; root:xnu-2422.115.4~1/RELEASE_X86_64 x86_64
What did you do?
I generated a log message with the standard flags. See
http://play.golang.org/p/uiXXdDvlaJ
What did you expect to see?
I expect to see a colon after the datestamp as described in the comment for the flag constants at http://golang.org/pkg/log/#pkg-constants. "A colon appears after these items"
I expect the output to be "logger: 2009/11/10 23:00:00: Hello, log file!"
What did you see instead?
I get "logger: 2009/11/10 23:00:00 Hello, log file!" instead.
The text was updated successfully, but these errors were encountered: