mirror of
https://github.com/octoleo/restic.git
synced 2024-11-29 16:23:59 +00:00
Add newline to debug output
This commit is contained in:
parent
57b8373bc9
commit
7558e99dd5
@ -110,6 +110,10 @@ func Log(tag string, f string, args ...interface{}) {
|
|||||||
opts.m.Lock()
|
opts.m.Lock()
|
||||||
defer opts.m.Unlock()
|
defer opts.m.Unlock()
|
||||||
|
|
||||||
|
if f[len(f)-1] != '\n' {
|
||||||
|
f += "\n"
|
||||||
|
}
|
||||||
|
|
||||||
dbgprint := func() {
|
dbgprint := func() {
|
||||||
fmt.Fprintf(os.Stderr, "DEBUG["+tag+"]: "+f, args...)
|
fmt.Fprintf(os.Stderr, "DEBUG["+tag+"]: "+f, args...)
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user