log: Print sha1 of HEAD and the date and time as the first thing in the log
diff --git a/src/compositor.c b/src/compositor.c
index 60e8dce..8f02422 100644
--- a/src/compositor.c
+++ b/src/compositor.c
@@ -44,11 +44,14 @@
 #include <dlfcn.h>
 #include <signal.h>
 #include <setjmp.h>
+#include <sys/time.h>
+#include <time.h>
 
 #include <wayland-server.h>
 #include "compositor.h"
 #include "../shared/os-compatibility.h"
 #include "log.h"
+#include "git-version.h"
 
 static struct wl_list child_process_list;
 static jmp_buf segv_jmp_buf;
@@ -3106,6 +3109,9 @@
 	int32_t xserver = 0;
 	char *socket_name = NULL;
 	char *config_file;
+	char buffer[64];
+	struct timeval tv;
+	struct tm *brokendown_time;
 
 	const struct config_key shell_config_keys[] = {
 		{ "type", CONFIG_KEY_STRING, &shell },
@@ -3135,6 +3141,11 @@
 
 	weston_log_file_open(log);
 
+	gettimeofday(&tv, NULL);
+	brokendown_time = localtime(&tv.tv_sec);
+	strftime(buffer, sizeof buffer, "%Y-%m-%d %H:%M:%S", brokendown_time);
+	weston_log("weston %s " WESTON_SHA1 "\n", buffer);
+
 	display = wl_display_create();
 
 	loop = wl_display_get_event_loop(display);