From dc0eb8406ae743c04bb364c9a1ef41844c8df173 Mon Sep 17 00:00:00 2001 From: rfm Date: Wed, 4 Nov 2015 09:32:40 +0000 Subject: [PATCH] tweak git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/sqlclient/trunk@39142 72102866-910b-0410-8b05-ffd578937521 --- SQLClientPool.m | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/SQLClientPool.m b/SQLClientPool.m index f1b218c..a58b9fe 100644 --- a/SQLClientPool.m +++ b/SQLClientPool.m @@ -762,16 +762,19 @@ static Class cls = Nil; * so we must therefore re-lock with condition 1. */ cond = 1; - if (nil == retainInfo) + if (_debugging > 0) { - retainInfo = [NSMutableString stringWithCapacity: 100]; + if (nil == retainInfo) + { + retainInfo = [NSMutableString stringWithCapacity: 100]; + } + [retainInfo appendFormat: + @" Client '%@' (retain count %"PRIuPTR + @") %s pool %s connected to server\n", + [client name], rc, + ((_items[index].u > 0) ? "taken from" : "available in"), + ((YES == connected) ? "and" : "but not")]; } - [retainInfo appendFormat: - @" Client '%@' (retain count %"PRIuPTR - @") %s pool %s connected to server\n", - [client name], rc, - ((_items[index].u > 0) ? "taken from" : "available in"), - ((YES == connected) ? "and" : "but not")]; if (YES == connected) { /* Still connected, so we count it as a free connection.