Salve
sto cercando d'inserire un AdonetAppender per log4net di cui in testata in una applicazione NET. 4.5.2,ma non mi funziona la configurazione:
<appender name="AdoNetAppender" type="log4net.Appender.AdoNetAppender">
<bufferSize value="100" />
<connectionType value="System.Data.SqlClient.SqlConnection, System.Data, Version=4.0.30319.34209, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<connectionString value="data source=TITDBSPCA01WSVI.servizi.trenitalia.it;initial catalog=StatoRotabileMgr;integrated security=false;persist security info=True;User ID=servizi;Password=Password." />
<commandText value="INSERT INTO [Manutenzione].[Log] ([Thread]) VALUES (@thread)" />
<parameter>
<parameterName value="@thread" />
<dbType value="String" />
<size value="255" />
<layout type="log4net.Layout.PatternLayout">
<conversionPattern value="%thread" />
</layout>
</parameter>
</appender>
e verificando il log di log4net ho riscontrato il seguente problema:
log4net: log4net assembly [log4net, Version=1.2.10.0, Culture=neutral, PublicKeyToken=1b44e1d426115821]. Loaded from [C:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\root\397c3788\64d86827\assembly\dl3\7e838470\30a2c5f6_d7ffd201\log4net.dll]. (.NET Runtime [4.0.30319.42000] on Microsoft Windows NT 6.2.9200.0)
log4net: DefaultRepositorySelector: defaultRepositoryType [log4net.Repository.Hierarchy.Hierarchy]
log4net: DefaultRepositorySelector: Creating repository for assembly [Trenitalia.Pdp.Infrastructure.Logging, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]
log4net: DefaultRepositorySelector: Assembly [Trenitalia.Pdp.Infrastructure.Logging, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null] Loaded From [C:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\root\397c3788\64d86827\assembly\dl3\6b93fda2\558fb2f6_d7ffd201\Trenitalia.Pdp.Infrastructure.Logging.dll]
log4net: DefaultRepositorySelector: Assembly [Trenitalia.Pdp.Infrastructure.Logging, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null] does not have a RepositoryAttribute specified.
log4net: DefaultRepositorySelector: Assembly [Trenitalia.Pdp.Infrastructure.Logging, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null] using repository [log4net-default-repository] and repository type [log4net.Repository.Hierarchy.Hierarchy]
log4net: DefaultRepositorySelector: Creating repository [log4net-default-repository] using type [log4net.Repository.Hierarchy.Hierarchy]
log4net: XmlConfigurator: configuring repository [log4net-default-repository] using file [E:\sviluppo\StatoRotMR\STMR\Ti.Pdp.IN.StatoRotabileMgrDispatcher\Ti.Pdp.IN.StatoRotabileMgrDispatcher.Services\web.config] watching for file updates
log4net: XmlConfigurator: configuring repository [log4net-default-repository] using file [E:\sviluppo\StatoRotMR\STMR\Ti.Pdp.IN.StatoRotabileMgrDispatcher\Ti.Pdp.IN.StatoRotabileMgrDispatcher.Services\web.config]
log4net: XmlConfigurator: configuring repository [log4net-default-repository] using stream
log4net: XmlConfigurator: loading XML configuration
log4net: XmlConfigurator: Configuring Repository [log4net-default-repository]
log4net: XmlHierarchyConfigurator: Configuration update mode [Merge].
log4net: XmlHierarchyConfigurator: Logger [root] Level string is [ALL].
log4net: XmlHierarchyConfigurator: Logger [root] level set to [name="ALL",value=-2147483648].
log4net: XmlHierarchyConfigurator: Loading Appender [AdoNetAppender] type: [log4net.Appender.AdoNetAppender]
log4net: XmlHierarchyConfigurator: Setting Property [BufferSize] to Int32 value [100]
log4net: XmlHierarchyConfigurator: Setting Property [ConnectionType] to String value [System.Data.SqlClient.SqlConnection, System.Data, Version=4.0.30319.34209, Culture=neutral, PublicKeyToken=b77a5c561934e089]
log4net: XmlHierarchyConfigurator: Setting Property [ConnectionString] to String value [data source=TITDBSPCA01WSVI.servizi.trenitalia.it;initial catalog=StatoRotabileMgr;integrated security=false;persist security info=True;User ID=servizi;Password=Password.]
log4net: XmlHierarchyConfigurator: Setting Property [CommandText] to String value [INSERT INTO [Manutenzione].[Log] ([Thread]) VALUES (@thread)]
log4net: XmlHierarchyConfigurator: Setting Property [ParameterName] to String value [@thread]
log4net: XmlHierarchyConfigurator: Setting Property [DbType] to DbType value [String]
log4net: XmlHierarchyConfigurator: Setting Property [Size] to Int32 value [255]
log4net: PatternParser: Converter [message] Option [] Format [min=-1,max=2147483647,leftAlign=False]
log4net: PatternParser: Converter [newline] Option [] Format [min=-1,max=2147483647,leftAlign=False]
log4net: XmlHierarchyConfigurator: Setting Property [ConversionPattern] to String value [%thread]
log4net: PatternParser: Converter [thread] Option [] Format [min=-1,max=2147483647,leftAlign=False]
log4net: XmlHierarchyConfigurator: Setting Property [Layout] to object [log4net.Layout.Layout2RawLayoutAdapter]
log4net: XmlHierarchyConfigurator: Setting Collection Property [AddParameter] to object [log4net.Appender.AdoNetAppenderParameter]
log4net: XmlHierarchyConfigurator: Created Appender [AdoNetAppender]
log4net: XmlHierarchyConfigurator: Adding appender named [AdoNetAppender] to logger [root].
log4net: XmlHierarchyConfigurator: Hierarchy Threshold []
Sapete darmi qualche consiglio?