[PATCH v3 2/3] Weston: compositor.c: introduce logging

Martin Minarik minarik11 at student.fiit.stuba.sk
Tue May 29 12:46:11 PDT 2012


---
 src/compositor.c |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/src/compositor.c b/src/compositor.c
index d21459b..4bfbf6a 100644
--- a/src/compositor.c
+++ b/src/compositor.c
@@ -48,6 +48,7 @@
 
 #include <wayland-server.h>
 #include "compositor.h"
+#include "log.h"
 
 static struct wl_list child_process_list;
 static jmp_buf segv_jmp_buf;
@@ -2853,6 +2854,9 @@ int main(int argc, char *argv[])
 	argc = parse_options(core_options,
 			     ARRAY_LENGTH(core_options), argc, argv);
 
+	weston_log_handle_server();
+	weston_log_file_create_in_home("/weston.log");
+
 	display = wl_display_create();
 
 	loop = wl_display_get_event_loop(display);
@@ -2957,5 +2961,7 @@ int main(int argc, char *argv[])
 	ec->destroy(ec);
 	wl_display_destroy(display);
 
+	weston_log_file_destroy();
+
 	return 0;
 }
-- 
1.7.5.4



More information about the wayland-devel mailing list