diff options
author | Kristian Høgsberg <krh@bitplanet.net> | 2012-06-08 16:16:52 -0400 |
---|---|---|
committer | Kristian Høgsberg <krh@bitplanet.net> | 2012-06-08 16:16:52 -0400 |
commit | a411c8b66c71dffc9e85bfdb24b04f8165a92f1b (patch) | |
tree | eab823cc9f95faab311c954e53c7c5143ce48a0c | |
parent | a7496e1c618bdb05adb8372ff5077de71fa0e36a (diff) |
log: Print sha1 of HEAD and the date and time as the first thing in the log
-rw-r--r-- | src/compositor.c | 11 |
1 files changed, 11 insertions, 0 deletions
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 @@ int main(int argc, char *argv[]) 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 @@ int main(int argc, char *argv[]) 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); |