23 lines
373 B
Go
23 lines
373 B
Go
//go:build android
|
|
|
|
package platform
|
|
|
|
/*
|
|
#cgo CFLAGS: -Werror
|
|
#cgo LDFLAGS: -landroid
|
|
|
|
#include <android/log.h>
|
|
#include <stdlib.h>
|
|
*/
|
|
import "C"
|
|
|
|
import "unsafe"
|
|
|
|
func LogInfo(tag, msg string) {
|
|
ctag := C.CString(tag)
|
|
defer C.free(unsafe.Pointer(ctag))
|
|
cmsg := C.CString(msg)
|
|
defer C.free(unsafe.Pointer(cmsg))
|
|
C.__android_log_write(C.ANDROID_LOG_INFO, ctag, cmsg)
|
|
}
|