logging-log4net-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Greg Peterson (JIRA)" <j...@apache.org>
Subject [jira] Commented: (LOG4NET-28) AdoNetAppender does not support inserting NULL into columns
Date Thu, 31 Jan 2008 19:35:08 GMT

    [ https://issues.apache.org/jira/browse/LOG4NET-28?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12564471#action_12564471

Greg Peterson commented on LOG4NET-28:

The PatternLayout uses SystemInfo.NullText which returns a string "(null)" not the null value.
If you use a custom property and set it to null, you will not have the parameter set to DBNull.

The PatternConverter.WriteObject(TextWriter writer, ILoggerRepository repository, object value)
calls repository.RendererMap.FindAndRender(value, writer);

which in turn, sets the value to "(null)" because the object value is null.

if (obj == null)

> AdoNetAppender does not support inserting NULL into columns
> -----------------------------------------------------------
>                 Key: LOG4NET-28
>                 URL: https://issues.apache.org/jira/browse/LOG4NET-28
>             Project: Log4net
>          Issue Type: Bug
>          Components: Appenders
>    Affects Versions: 1.2.9
>            Reporter: Nicko Cadell
>            Assignee: Nicko Cadell
>            Priority: Minor
>             Fix For: 1.2.10
> The AdoNetAppender does not support inserting NULL values into columns.
> If a column allows NULL values then the AdoNetAppender should allow NULL values to be
inserted. For most value types this means using the DBNull value for the parameter. The AdoNetAppenderParameter
should convert CLI null values into DBNull values before setting the parameter value.

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message