You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user-cs@ibatis.apache.org by Okku Touronen <ok...@stendahls.net> on 2006/05/22 17:12:42 UTC
Tiny cut and paste error found in logging code?
I think row 114 should in file DefaultPreparedCommand.cs:
Should be:
_typeLogList.Remove(0, _typeLogList.Length);
Instead of:
_typeLogList.Remove(0, __paramLogList.Length);
RE: Tiny cut and paste error found in logging code?
Posted by Okku Touronen <ok...@stendahls.net>.
Hello again.
I think there are still some problems.
The clear StringBuilder part should be before the for-loop like this:
#region Logging
if(_logger.IsDebugEnabled)
{
_paramLogList.Remove(0, _paramLogList.Length);
_typeLogList.Remove(0, _typeLogList.Length);
}
#endregion
int count = properties.Count;
for ( int i = 0; i < count; ++i )
{
IDataParameter sqlParameter = parameters[i];
IDataParameter parameterCopy =
command.CreateParameter();
ParameterProperty property =
request.ParameterMap.GetProperty(i);
#region Logging
if (_logger.IsDebugEnabled)
{
_paramLogList.Append(sqlParameter.ParameterName);
_paramLogList.Append("=[");
_typeLogList.Append(sqlParameter.ParameterName);
_typeLogList.Append("=[");
}
#endregion
Or else just the last parameter is outputted to the debug stream.
Cheers.
_____
From: Gilles Bayon [mailto:ibatis.net@gmail.com]
Sent: den 23 maj 2006 19:55
To: user-cs@ibatis.apache.org
Subject: Re: Tiny cut and paste error found in logging code?
Thanks,
In SVN
On 5/22/06, Okku Touronen <ok...@stendahls.net> wrote:
I think row 114 should in file DefaultPreparedCommand.cs:
Should be:
_typeLogList.Remove(0, _typeLogList.Length);
Instead of:
_typeLogList.Remove(0, __paramLogList.Length);
Re: Tiny cut and paste error found in logging code?
Posted by Gilles Bayon <ib...@gmail.com>.
Thanks,
In SVN
On 5/22/06, Okku Touronen <ok...@stendahls.net> wrote:
>
> I think row 114 should in file DefaultPreparedCommand.cs:
>
>
>
> Should be:
>
> _typeLogList.Remove(0, _typeLogList.Length);
>
>
>
> Instead of:
>
> _typeLogList.Remove(0, __paramLogList.Length);
>
>
>
>
>