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 <antonio.caggiano@collabora.com>
Suggested-by: Pekka Paalanen <pekka.paalanen@collabora.com>
dev
Antonio Caggiano 5 years ago committed by Simon Ser
parent 50aa3a76c0
commit fdc9b4bce5
  1. 2
      compositor/main.c

@ -180,6 +180,8 @@ weston_log_file_open(const char *filename)
weston_logfile = fopen(filename, "a"); weston_logfile = fopen(filename, "a");
if (weston_logfile) if (weston_logfile)
os_fd_set_cloexec(fileno(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) if (weston_logfile == NULL)

Loading…
Cancel
Save