Log4net ADONetAppender - View parameter values?

142 Views Asked by At

Is it possible to view the AdoNetAppenderParameter values when debugging log4net?

If so, how?

Thanks!

1

There are 1 best solutions below

0
jan-seins On

In the sourcecode from https://github.com/apache/log4net you will find the file AdoNetAppender.cs:

In the virtual public void Prepare(IDbCommand command) the parameters are assigned:

IDbDataParameter param = command.CreateParameter();

// Set the parameter properties
param.ParameterName = ParameterName;

    if (!m_inferType)
    {
        param.DbType = DbType;
    }
    if (Precision != 0)
    {
        param.Precision = Precision;
    }
    if (Scale != 0)
    {
        param.Scale = Scale;
    }
    if (Size != 0)
    {
        param.Size = Size;
    }

    // Add the parameter to the collection of params
    command.Parameters.Add(param);

When you debug that you can check the parameter-objects.