Merge pull request #779 from daskol/iss-241

[#241] Allow to set writer during logger usage.
This commit is contained in:
David Bariod
2018-07-02 07:55:18 +02:00
committed by GitHub
2 changed files with 7 additions and 3 deletions
+1 -3
View File
@@ -15,9 +15,7 @@ func StandardLogger() *Logger {
// SetOutput sets the standard logger output.
func SetOutput(out io.Writer) {
std.mu.Lock()
defer std.mu.Unlock()
std.Out = out
std.SetOutput(out)
}
// SetFormatter sets the standard logger formatter.