• hagen1778's avatar
    log: fix data race on log.Output · d1731f8c
    hagen1778 authored
    There was unprotected access to Logger.flag in log.Output which
    could lead to data race in cases when log.SetFlags called simultaneously.
    For example, "hot" switching on/off debug-mode for Logger by log.SetFlags
    while application still writing logs.
    
    Fixes #21935
    
    Change-Id: I36be25f23cad44cde62ed1af28a30d276400e1b8
    Reviewed-on: https://go-review.googlesource.com/64710Reviewed-by: 's avatarJoe Tsai <thebrokentoaster@gmail.com>
    Run-TryBot: Joe Tsai <thebrokentoaster@gmail.com>
    TryBot-Result: Gobot Gobot <gobot@golang.org>
    d1731f8c
Name
Last commit
Last update
..
syslog Loading commit data...
example_test.go Loading commit data...
log.go Loading commit data...
log_test.go Loading commit data...