mirror of
https://git.sr.ht/~eliasnaur/gio
synced 2026-07-03 16:35:36 +00:00
app/internal/log: use the app ID as the Android log tag
This way, a Gio app's logs can be filtered uniquely, which wasn't possible before since the tag "gio" would be the same between gio apps. Since the app ID is supplied at build time, inject it via a variable with the linker's help. The variable is only used on Android for now, but that's OK. It might be useful for other platforms or other internal packages in the future. Fixes #84. Signed-off-by: Daniel Martí <mvdan@mvdan.cc>
This commit is contained in:
@@ -22,7 +22,7 @@ import (
|
||||
// 1024 is the truncation limit from android/log.h, plus a \n.
|
||||
const logLineLimit = 1024
|
||||
|
||||
var logTag = C.CString("gio")
|
||||
var logTag = C.CString(appID)
|
||||
|
||||
func init() {
|
||||
// Android's logcat already includes timestamps.
|
||||
|
||||
Reference in New Issue
Block a user