ibatis-user-cs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Okku Touronen" <o...@stendahls.net>
Subject RE: Tiny cut and paste error found in logging code?
Date Tue, 30 May 2006 09:17:27 GMT
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 <okku@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);

 

 

 


Mime
View raw message