mirror of
https://github.com/gnustep/libs-sqlclient.git
synced 2025-02-14 15:40:59 +00:00
fixup logging on connect
This commit is contained in:
parent
ca2f44a323
commit
1a0d338a78
1 changed files with 14 additions and 4 deletions
18
SQLClient.m
18
SQLClient.m
|
@ -2980,21 +2980,31 @@ static int poolConnections = 0;
|
|||
if (_duration >= 0)
|
||||
{
|
||||
NSTimeInterval d;
|
||||
NSString *s;
|
||||
|
||||
if (0 == _connectFails)
|
||||
{
|
||||
s = @"success";
|
||||
d = _lastConnect - _lastStart;
|
||||
}
|
||||
else
|
||||
{
|
||||
s = @"failure";
|
||||
d = _lastOperation - _lastStart;
|
||||
}
|
||||
|
||||
d = _lastOperation - _lastStart;
|
||||
if (d >= _duration)
|
||||
{
|
||||
if (_lastListen > 0.0)
|
||||
{
|
||||
[self debug: @"Duration %g for connection (%@)"
|
||||
@", of which %g adding observers.",
|
||||
d, (0 == _connectFails ? @"success" : @"failure"),
|
||||
_lastOperation - _lastListen];
|
||||
d, s, _lastOperation - _lastListen];
|
||||
}
|
||||
else
|
||||
{
|
||||
[self debug: @"Duration %g for connection (%@).",
|
||||
d, (0 == _connectFails ? @"success" : @"failure")];
|
||||
d, s];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue