device-mapper: Move all devicemapper spew to log through utils.Debugf().

This commit is contained in:
Alexander Larsson
2013-10-11 16:31:06 -07:00
committed by Solomon Hykes
parent c77697a45c
commit b440ec0136
3 changed files with 57 additions and 0 deletions
+13
View File
@@ -0,0 +1,13 @@
package devmapper
import "C"
// Due to the way cgo works this has to be in a separate file, as devmapper.go has
// definitions in the cgo block, which is incompatible with using "//export"
//export DevmapperLogCallback
func DevmapperLogCallback(level C.int, file *C.char, line C.int, dm_errno_or_class C.int, message *C.char) {
if dmLogger != nil {
dmLogger.log(int(level), C.GoString(file), int(line), int(dm_errno_or_class), C.GoString(message))
}
}