Signed-off-by: Martin Minarik <[email protected]>
---
 src/compositor.c |   10 +++++++++-
 1 files changed, 9 insertions(+), 1 deletions(-)

diff --git a/src/compositor.c b/src/compositor.c
index 3c1e058..6582e21 100644
--- a/src/compositor.c
+++ b/src/compositor.c
@@ -25,13 +25,13 @@
 #define _GNU_SOURCE
 
 #include "config.h"
+#include "log.h"
 
 #include <stdio.h>
 #include <string.h>
 #include <stdlib.h>
 #include <stdint.h>
 #include <limits.h>
-#include <stdarg.h>
 #include <assert.h>
 #include <sys/ioctl.h>
 #include <sys/wait.h>
@@ -2845,6 +2845,14 @@ int main(int argc, char *argv[])
                { WESTON_OPTION_STRING, "module", 0, &module },
        };
 
+       if (getenv("HOME")) {
+               char * logfname = "/weston.log";
+               char * home = getenv("HOME");
+               char string[128];
+               snprintf(string, 126, "%s%s", home,logfname);
+               weston_log_file_create(string);
+       }
+
        memset(&xkb_names, 0, sizeof(xkb_names));
 
        argc = parse_options(core_options,
@@ -2953,6 +2960,7 @@ int main(int argc, char *argv[])
 
        ec->destroy(ec);
        wl_display_destroy(display);
+       weston_log_file_destroy();
 
        return 0;
 }
-- 
1.7.5.4

_______________________________________________
wayland-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/wayland-devel

Reply via email to