From e3d8ed2a9688b50e22e71755d83984659879ecf3 Mon Sep 17 00:00:00 2001 From: Adam Dickmeiss Date: Tue, 19 Nov 2013 10:16:10 +0100 Subject: [PATCH] Log when session terminates PAZ-905 And remove logging about service_incref. --- src/connection.c | 1 - src/pazpar2_config.c | 3 --- src/session.c | 4 +++- 3 files changed, 3 insertions(+), 5 deletions(-) diff --git a/src/connection.c b/src/connection.c index b499b9d..ca778ab 100644 --- a/src/connection.c +++ b/src/connection.c @@ -390,7 +390,6 @@ void connect_resolver_host(struct host *host, iochan_man_t iochan_man) } else { - yaz_log(YLOG_LOG, "connect_resolver_host: state=%d", con->state); con = con->next; } } diff --git a/src/pazpar2_config.c b/src/pazpar2_config.c index 1dfb379..8068b13 100644 --- a/src/pazpar2_config.c +++ b/src/pazpar2_config.c @@ -281,8 +281,6 @@ void service_destroy(struct conf_service *service) void service_incref(struct conf_service *service) { - yaz_log(YLOG_LOG, "service_incref. p=%p cnt=%d", service, - service->ref_count); pazpar2_incref(&service->ref_count, service->mutex); } @@ -1286,7 +1284,6 @@ void server_destroy(struct conf_server *server) s = s_next; } pp2_charset_fact_destroy(server->charsets); - yaz_log(YLOG_LOG, "server_destroy server=%p", server); http_server_destroy(server->http_server); } diff --git a/src/session.c b/src/session.c index a268c48..9091b6b 100644 --- a/src/session.c +++ b/src/session.c @@ -940,7 +940,7 @@ void session_apply_setting(struct session *se, char *dbname, char *setting, void session_destroy(struct session *se) { struct session_database *sdb; - session_log(se, YLOG_DEBUG, "Destroying"); + session_log(se, YLOG_LOG, "destroy"); session_use(-1); session_remove_cached_clients(se); @@ -1010,6 +1010,8 @@ struct session *new_session(NMEM nmem, struct conf_service *service, session->normalize_cache = normalize_cache_create(); session->session_mutex = 0; pazpar2_mutex_create(&session->session_mutex, tmp_str); + session_log(session, YLOG_LOG, "create"); + session_use(1); return session; } -- 1.7.10.4