mirror of
https://github.com/zrepl/zrepl.git
synced 2024-12-23 15:38:49 +01:00
21 lines
328 B
Go
21 lines
328 B
Go
|
package stream
|
||
|
|
||
|
import (
|
||
|
"fmt"
|
||
|
"os"
|
||
|
)
|
||
|
|
||
|
var debugEnabled bool = false
|
||
|
|
||
|
func init() {
|
||
|
if os.Getenv("ZREPL_RPC_DATACONN_STREAM_DEBUG") != "" {
|
||
|
debugEnabled = true
|
||
|
}
|
||
|
}
|
||
|
|
||
|
func debug(format string, args ...interface{}) {
|
||
|
if debugEnabled {
|
||
|
fmt.Fprintf(os.Stderr, "rpc/dataconn/stream: %s\n", fmt.Sprintf(format, args...))
|
||
|
}
|
||
|
}
|