From 29da057d32eced4a2110ee07e62362841849626f Mon Sep 17 00:00:00 2001 From: alobbs Date: Tue, 30 Dec 2008 10:02:36 +0000 Subject: [PATCH] git-svn-id: svn://cherokee-project.com/cherokee/trunk@2659 5dc97367-97f1-0310-9951-d761b3857238 --- ChangeLog | 3 +++ cherokee/server.c | 23 ++++++++++++++++++++++- 2 files changed, 25 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 257cf4839..50a42730a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,8 @@ 2008-12-30 Alvaro Lopez Ortega + * cherokee/server.c: Print more information as part of the banner: + The bound ports, tracing, and I/O cache support are now included. + * cherokee/trace.c: Adds a shorter path for CHEROKEE_TRACE=all. 2008-12-29 Alvaro Lopez Ortega diff --git a/cherokee/server.c b/cherokee/server.c index f96a61163..390fec93b 100644 --- a/cherokee/server.c +++ b/cherokee/server.c @@ -353,8 +353,10 @@ cherokee_server_set_min_latency (cherokee_server_t *srv, int msecs) static ret_t print_banner (cherokee_server_t *srv) { + ret_t ret; char *method; cherokee_list_t *i; + cherokee_buffer_t *buf; size_t b = 0; size_t len = 0; cherokee_buffer_t n = CHEROKEE_BUF_INIT; @@ -378,9 +380,11 @@ print_banner (cherokee_server_t *srv) b += 1; if (! cherokee_buffer_is_empty(&bind->ip)) { cherokee_buffer_add_buffer (&n, &bind->ip); - cherokee_buffer_add_char (&n, ':'); + } else { + cherokee_buffer_add_str (&n, "ALL"); } + cherokee_buffer_add_char (&n, ':'); cherokee_buffer_add_ulong10 (&n, bind->port); if (bind->socket.is_tls == TLS) { @@ -425,6 +429,12 @@ print_banner (cherokee_server_t *srv) cherokee_buffer_add_va (&n, ", %d fds system limit, max. %d connections", cherokee_fdlimit, srv->conns_max); + /* I/O-cache + */ + if (srv->iocache) { + cherokee_buffer_add_str (&n, ", caching I/O"); + } + /* Threading stuff */ if (srv->thread_num <= 1) { @@ -448,6 +458,15 @@ print_banner (cherokee_server_t *srv) } } + /* Trace + */ + ret = cherokee_trace_get_trace (&buf); + if ((ret == ret_ok) && + (! cherokee_buffer_is_empty (buf))) + { + cherokee_buffer_add_va (&n, ", tracing '%s'", buf->buf); + } + /* Print it! */ cherokee_print_wrapped (&n); @@ -1409,6 +1428,8 @@ configure_server (cherokee_server_t *srv) /* IO-cache */ TRACE (ENTRIES, "Configuring %s\n", "iocache"); + cherokee_config_node_read_bool (&srv->config, "server!iocache", &srv->iocache_enabled); + if (srv->iocache_enabled) { ret = cherokee_iocache_new (&srv->iocache); if (ret != ret_ok)