Add timestamp to LB log

PUBLISHED_FROM=61b87fcee909241d5bdf2ba7407003c0c3cfbd72
This commit is contained in:
rojer authored and Cesanta Bot committed 2016-06-13 12:34:30 +00:00
1 parent 1718490982
commit 1daa5e69b1
1 file changed
+3 -2
+3 -2
View File
@@ -277,8 +277,9 @@ static int connect_backend(struct conn_data *conn, struct http_message *hm) {
struct mg_connection *nc = conn->client.nc;
struct http_backend *be = choose_backend(hm);
write_log("%.*s %.*s backend=%s\n", (int) hm->method.len, hm->method.p,
(int) hm->uri.len, hm->uri.p, be ? be->host_port : "not defined");
write_log("%ld %.*s %.*s backend=%s\n", (long) time(NULL),
(int) hm->method.len, hm->method.p, (int) hm->uri.len, hm->uri.p,
be ? be->host_port : "not defined");
if (be == NULL) return 0;
if (be->redirect != 0) {