Skip to content

Commit

Permalink
git-svn-id: svn://cherokee-project.com/cherokee/trunk@2659 5dc97367-9…
Browse files Browse the repository at this point in the history
…7f1-0310-9951-d761b3857238
  • Loading branch information
alobbs committed Dec 30, 2008
1 parent 9058175 commit 29da057
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 1 deletion.
3 changes: 3 additions & 0 deletions ChangeLog
@@ -1,5 +1,8 @@
2008-12-30 Alvaro Lopez Ortega <alvaro@octality.com>

* 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 <alvaro@octality.com>
Expand Down
23 changes: 22 additions & 1 deletion cherokee/server.c
Expand Up @@ -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;
Expand All @@ -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) {
Expand Down Expand Up @@ -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) {
Expand All @@ -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);
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit 29da057

Please sign in to comment.