compositor: prettify program info in log
No need to print current date-time anymore, since log.c does the date automatically. Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
This commit is contained in:
committed by
Kristian Høgsberg
parent
f5c7576581
commit
bce4c2b1ca
+6
-7
@@ -3159,9 +3159,6 @@ int main(int argc, char *argv[])
|
|||||||
int32_t xserver = 0;
|
int32_t xserver = 0;
|
||||||
char *socket_name = NULL;
|
char *socket_name = NULL;
|
||||||
char *config_file;
|
char *config_file;
|
||||||
char buffer[64];
|
|
||||||
struct timeval tv;
|
|
||||||
struct tm *brokendown_time;
|
|
||||||
|
|
||||||
const struct config_key shell_config_keys[] = {
|
const struct config_key shell_config_keys[] = {
|
||||||
{ "type", CONFIG_KEY_STRING, &shell },
|
{ "type", CONFIG_KEY_STRING, &shell },
|
||||||
@@ -3191,10 +3188,12 @@ int main(int argc, char *argv[])
|
|||||||
exit(EXIT_FAILURE);
|
exit(EXIT_FAILURE);
|
||||||
}
|
}
|
||||||
|
|
||||||
gettimeofday(&tv, NULL);
|
weston_log("%s\n"
|
||||||
brokendown_time = localtime(&tv.tv_sec);
|
STAMP_SPACE "%s\n"
|
||||||
strftime(buffer, sizeof buffer, "%Y-%m-%d %H:%M:%S", brokendown_time);
|
STAMP_SPACE "Bug reports to: %s\n"
|
||||||
weston_log("weston %s " WESTON_SHA1 "\n", buffer);
|
STAMP_SPACE "Build: %s\n",
|
||||||
|
PACKAGE_STRING, PACKAGE_URL, PACKAGE_BUGREPORT,
|
||||||
|
WESTON_SHA1);
|
||||||
|
|
||||||
display = wl_display_create();
|
display = wl_display_create();
|
||||||
|
|
||||||
|
|||||||
@@ -23,6 +23,9 @@
|
|||||||
#ifndef _WESTON_LOG_H_
|
#ifndef _WESTON_LOG_H_
|
||||||
#define _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_open(const char *filename);
|
||||||
void weston_log_file_close(void);
|
void weston_log_file_close(void);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user