Swap the object id logging order

This gives us a same-sized prefix for messages, making visual parsing of
logs a bit easier.

Part-of: <https://gitlab.freedesktop.org/libinput/libei/-/merge_requests/366>
This commit is contained in:
Peter Hutterer 2025-12-12 16:07:23 +10:00
parent 2996a66b37
commit 26e671f192
3 changed files with 8 additions and 8 deletions

View file

@ -425,7 +425,7 @@ brei_dispatch(struct brei_context *brei,
if (result)
goto error;
log_debug(brei, "dispatching %s.%s() on object %#" PRIx64 "", interface->name, interface->incoming[opcode].name, object_id);
log_debug(brei, "object %#" PRIx64 " dispatching %s.%s()", object_id, interface->name, interface->incoming[opcode].name);
/* Success! Let's pass this on to the
* context to process */

View file

@ -171,7 +171,7 @@ ei_update_serial(struct ei *ei, uint32_t serial)
void
ei_register_object(struct ei *ei, struct brei_object *object)
{
log_debug(ei, "registering %s v%u object %#" PRIx64 "", object->interface->name, object->version, object->id);
log_debug(ei, "object %#" PRIx64 " registering %s v%u", object->id, object->interface->name, object->version);
list_append(&ei->proto_objects, &object->link);
}
@ -182,12 +182,12 @@ ei_defunct_object_free(struct ei_defunct_object *obj)
free(obj);
}
void
ei_unregister_object(struct ei *ei, struct brei_object *object)
{
log_debug(ei, "deregistering %s v%u object %#" PRIx64 "", object->interface->name, object->version, object->id);
log_debug(ei, "object %#" PRIx64 " deregistering %s v%u", object->id, object->interface->name, object->version);
list_remove(&object->link);
struct ei_defunct_object *obj = xalloc(sizeof *obj);
obj->object_id = object->id;
obj->time = ei_now(ei);
@ -913,7 +913,7 @@ int
ei_send_message(struct ei *ei, const struct brei_object *object,
uint32_t opcode, const char *signature, size_t nargs, ...)
{
log_debug(ei, "sending: object %#" PRIx64 " (%s@v%u:%s(%u)) signature '%s'",
log_debug(ei, "object %#" PRIx64 " sending: (%s@v%u:%s(%u)) signature '%s'",
object->id,
object->interface->name,
object->interface->version,

View file

@ -140,7 +140,7 @@ void
eis_client_register_object(struct eis_client *client, struct brei_object *object)
{
struct eis *eis = eis_client_get_context(client);
log_debug(eis, "registering %s v%u object %#" PRIx64 "", object->interface->name, object->version, object->id);
log_debug(eis, "object %#" PRIx64 " registering %s v%u", object->id, object->interface->name, object->version);
list_append(&client->proto_objects, &object->link);
}
@ -148,7 +148,7 @@ void
eis_client_unregister_object(struct eis_client *client, struct brei_object *object)
{
struct eis *eis = eis_client_get_context(client);
log_debug(eis, "deregistering %s v%u object %#" PRIx64 "", object->interface->name, object->version, object->id);
log_debug(eis, "object %#" PRIx64 " deregistering %s v%u", object->id, object->interface->name, object->version);
list_remove(&object->link);
}
@ -211,7 +211,7 @@ eis_client_send_message(struct eis_client *client, const struct brei_object *obj
{
struct eis *eis = eis_client_get_context(client);
log_debug(eis, "sending: object %#" PRIx64 " (%s@v%u:%s(%u)) signature '%s'",
log_debug(eis, "object %#" PRIx64 " sending (%s@v%u:%s(%u)) signature '%s'",
object->id,
object->interface->name,
object->interface->version,