]> Cypherpunks repositories - gostls13.git/commit
log: generalize getting and setting flags and prefix.
authorRob Pike <r@golang.org>
Wed, 6 Apr 2011 18:48:03 +0000 (11:48 -0700)
committerRob Pike <r@golang.org>
Wed, 6 Apr 2011 18:48:03 +0000 (11:48 -0700)
commit5ee13c0d59de2f26dacc53046ce265232eeb6f2b
tree1679f68083c8d5bf5d9408f0c6f3d2ec9eef978f
parent41971434d1ac17d3a978a651e619d43e266ddbba
log: generalize getting and setting flags and prefix.
- used to be only for standard log, not for user-built.
- there were no getters.
Also rearrange the code a little so we can avoid allocating
a buffer on every call.  Logging is expensive but we should
avoid unnecessary cost.

This should have no effect on existing code.

R=rsc
CC=golang-dev
https://golang.org/cl/4363045
src/pkg/log/log.go
src/pkg/log/log_test.go