1
0
mirror of https://github.com/golang/go synced 2024-10-05 16:51:21 -06:00
Commit Graph

6 Commits

Author SHA1 Message Date
Rob Pike
d340b10366 log: logging an empty string should still print a line
Print("") was printing a header but no line.

Fixes #9665.

Change-Id: Iac783187786065e1389ad6e8d7ef02c579ed7bd8
Reviewed-on: https://go-review.googlesource.com/8665
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2015-04-09 17:02:27 +00:00
Andrew Gerrand
56ba3fb765 log: add SetOutput method on Logger
Fixes #9629

Change-Id: I66091003b97742ca6d857fe51d609833ab727216
Reviewed-on: https://go-review.googlesource.com/3023
Reviewed-by: Rob Pike <r@golang.org>
2015-01-30 16:00:10 +00:00
Rob Pike
86fdcbedbc log: add global Output function
It was just an oversight that this one method of Logger was not
made available for the standard (std) Logger.

Fixes #9183

Change-Id: I2f251becdb0bae459212d09ea0e5e88774d16dea
Reviewed-on: https://go-review.googlesource.com/2686
Reviewed-by: Andrew Gerrand <adg@golang.org>
2015-01-12 04:45:38 +00:00
Martin Möhrmann
a3876ac21c log: optimize itoa
Reduce buffer to maximally needed size for conversion of 64bit integers.
Reduce number of used integer divisions.

benchmark            old ns/op     new ns/op     delta
BenchmarkItoa        144           119           -17.36%
BenchmarkPrintln     783           752           -3.96%

Change-Id: I6d57a7feebf90f303be5952767107302eccf4631
Reviewed-on: https://go-review.googlesource.com/2215
Reviewed-by: Rob Pike <r@golang.org>
2015-01-09 00:22:10 +00:00
Andrew Gerrand
43ce5c0306 log: update doc comment
Fixes #9448.

Change-Id: I8e1d676688d9e9b2fa3519ebc530905f574a1b3e
Reviewed-on: https://go-review.googlesource.com/2088
Reviewed-by: Rob Pike <r@golang.org>
2015-01-05 01:21:52 +00:00
Russ Cox
c007ce824d build: move package sources from src/pkg to src
Preparation was in CL 134570043.
This CL contains only the effect of 'hg mv src/pkg/* src'.
For more about the move, see golang.org/s/go14nopkg.
2014-09-08 00:08:51 -04:00