mirror of
https://github.com/rclone/rclone.git
synced 2024-11-29 20:04:52 +01:00
19 lines
319 B
Go
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())
|
|
}
|