No need to print current date-time anymore, since log.c does the date automatically.
Signed-off-by: Pekka Paalanen <[email protected]> --- src/compositor.c | 13 ++++++------- src/log.h | 3 +++ 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/src/compositor.c b/src/compositor.c index 6deabe1..87f5363 100644 --- a/src/compositor.c +++ b/src/compositor.c @@ -3151,9 +3151,6 @@ 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 }, @@ -3183,10 +3180,12 @@ int main(int argc, char *argv[]) exit(EXIT_FAILURE); } - 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); + weston_log("%s\n" + STAMP_SPACE "%s\n" + STAMP_SPACE "Bug reports to: %s\n" + STAMP_SPACE "Build: %s\n", + PACKAGE_STRING, PACKAGE_URL, PACKAGE_BUGREPORT, + WESTON_SHA1); display = wl_display_create(); diff --git a/src/log.h b/src/log.h index 19d36dd..178b5cd 100644 --- a/src/log.h +++ b/src/log.h @@ -23,6 +23,9 @@ #ifndef _WESTON_LOG_H_ #define _WESTON_LOG_H_ +/* String literal of spaces, the same width as the timestamp. */ +#define STAMP_SPACE " " + void weston_log_file_open(const char *filename); void weston_log_file_close(void); -- 1.7.3.4 _______________________________________________ wayland-devel mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/wayland-devel
