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>
This commit is contained in:
Alex Yang 2023-05-24 11:24:23 -07:00
parent 4ec379ebcc
commit 6d33346571
4 changed files with 12 additions and 12 deletions

View file

@ -383,7 +383,7 @@ client_test_queue_destroy_with_attached_proxies(void)
/* Check that the log contains some information about the attached
* wl_callback proxy. */
log = map_file(client_log_fd, &log_len);
ret = snprintf(callback_name, sizeof(callback_name), "wl_callback@%u",
ret = snprintf(callback_name, sizeof(callback_name), "wl_callback#%u",
wl_proxy_get_id((struct wl_proxy *) callback));
assert(ret > 0 && ret < (int)sizeof(callback_name) &&
"callback name creation failed (possibly truncated)");
@ -456,7 +456,7 @@ client_test_queue_destroy_default_with_attached_proxies(void)
/* Check that the log does not contain any warning about the attached
* wl_callback proxy. */
log = maybe_map_file(client_log_fd, &log_len);
ret = snprintf(callback_name, sizeof(callback_name), "wl_callback@%u",
ret = snprintf(callback_name, sizeof(callback_name), "wl_callback#%u",
wl_proxy_get_id((struct wl_proxy *) callback));
assert(ret > 0 && ret < (int)sizeof(callback_name) &&
"callback name creation failed (possibly truncated)");