summaryrefslogtreecommitdiffstats
path: root/src/connection.c
diff options
context:
space:
mode:
authorAlex Yang <aycyang@google.com>2023-05-24 11:24:23 -0700
committerAlex Yang <aycyang@google.com>2023-06-27 14:08:25 -0700
commit6d3334657180f3663b8d83636f4d1bc2097492d2 (patch)
treee19fccaf09c724eabc614df8de258c92375f6a91 /src/connection.c
parenttests: manually wrap libc functions (diff)
downloadwayland-6d3334657180f3663b8d83636f4d1bc2097492d2.tar
wayland-6d3334657180f3663b8d83636f4d1bc2097492d2.tar.gz
wayland-6d3334657180f3663b8d83636f4d1bc2097492d2.tar.bz2
wayland-6d3334657180f3663b8d83636f4d1bc2097492d2.tar.lz
wayland-6d3334657180f3663b8d83636f4d1bc2097492d2.tar.xz
wayland-6d3334657180f3663b8d83636f4d1bc2097492d2.tar.zst
wayland-6d3334657180f3663b8d83636f4d1bc2097492d2.zip
debug: Replace "@<id>" with "#<id>" in logs
Wayland debug logs resemble email addresses. This is a problem when anonymizing logs from users. For example: [2512874.343] xdg_surface@700.configure(333) In the above log line, the substring "surface@700.config" can be mistaken for an email address and redacted during anonymization. Signed-off-by: Alex Yang <aycyang@google.com>
Diffstat (limited to 'src/connection.c')
-rw-r--r--src/connection.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/connection.c b/src/connection.c
index ceaeac1..8a2d9e9 100644
--- a/src/connection.c
+++ b/src/connection.c
@@ -1283,7 +1283,7 @@ wl_closure_print(struct wl_closure *closure, struct wl_object *target,
clock_gettime(CLOCK_REALTIME, &tp);
time = (tp.tv_sec * 1000000L) + (tp.tv_nsec / 1000);
- fprintf(f, "[%7u.%03u] %s%s%s@%u.%s(",
+ fprintf(f, "[%7u.%03u] %s%s%s#%u.%s(",
time / 1000, time % 1000,
discarded ? "discarded " : "",
send ? " -> " : "",
@@ -1323,7 +1323,7 @@ wl_closure_print(struct wl_closure *closure, struct wl_object *target,
break;
case 'o':
if (closure->args[i].o)
- fprintf(f, "%s@%u",
+ fprintf(f, "%s#%u",
closure->args[i].o->interface->name,
closure->args[i].o->id);
else
@@ -1335,7 +1335,7 @@ wl_closure_print(struct wl_closure *closure, struct wl_object *target,
else
nval = closure->args[i].n;
- fprintf(f, "new id %s@",
+ fprintf(f, "new id %s#",
(closure->message->types[i]) ?
closure->message->types[i]->name :
"[unknown]");