mirror of
https://gitlab.freedesktop.org/libinput/libinput.git
synced 2026-01-03 05:40:10 +01:00
evdev: reduce the number of separate calls to log_msg
We somewhat expect log message handlers to figure out how to prefix newlines correctly anyway, but reducing the number of messages printed separately makes the simple case better. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
This commit is contained in:
parent
92aa1d1418
commit
3279845d63
1 changed files with 6 additions and 9 deletions
15
src/evdev.h
15
src/evdev.h
|
|
@ -655,17 +655,14 @@ evdev_log_msg_va(struct evdev_device *device,
|
|||
const char *format,
|
||||
va_list args)
|
||||
{
|
||||
/* Anything info and above is user-visible, use the device name */
|
||||
log_msg(evdev_libinput_context(device),
|
||||
priority,
|
||||
"%-7s - ",
|
||||
evdev_device_get_sysname(device));
|
||||
|
||||
/* Anything info and above is user-visible, use the device name */
|
||||
if (priority > LIBINPUT_LOG_PRIORITY_DEBUG)
|
||||
log_msg(evdev_libinput_context(device),
|
||||
priority,
|
||||
"%s: ",
|
||||
device->devname);
|
||||
"%-7s - %s%s",
|
||||
evdev_device_get_sysname(device),
|
||||
(priority > LIBINPUT_LOG_PRIORITY_DEBUG) ? device->devname : "",
|
||||
(priority > LIBINPUT_LOG_PRIORITY_DEBUG) ? ": " : ""
|
||||
);
|
||||
|
||||
log_msg_va(evdev_libinput_context(device),
|
||||
priority,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue