From fdc9b4bce5816cdafb9dc08f499ed76778945d36 Mon Sep 17 00:00:00 2001 From: Antonio Caggiano Date: Thu, 28 May 2020 16:28:08 +0200 Subject: [PATCH] compositor: Print error opening log file When failing to open the log file nothing is reported to the user, therefore we print a message on stderr when that happens. Signed-off-by: Antonio Caggiano Suggested-by: Pekka Paalanen --- compositor/main.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/compositor/main.c b/compositor/main.c index c1a72701..af31c94e 100644 --- a/compositor/main.c +++ b/compositor/main.c @@ -180,6 +180,8 @@ weston_log_file_open(const char *filename) weston_logfile = fopen(filename, "a"); if (weston_logfile) os_fd_set_cloexec(fileno(weston_logfile)); + else + fprintf(stderr, "Failed to open %s: %s\n", filename, strerror(errno)); } if (weston_logfile == NULL)