rclone/vendor/storj.io/drpc/drpcdebug/log_enabled.go
2020-05-12 15:56:50 +00:00

19 lines
319 B
Go

// Copyright (C) 2019 Storj Labs, Inc.
// See LICENSE for copying information.
// +build debug
package drpcdebug
import (
"log"
"os"
)
var logger = log.New(os.Stderr, "", 0)
// Log executes the callback for a string to log if built with the debug tag.
func Log(cb func() string) {
logger.Output(2, "\t"+cb())
}