logging-log4net-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Kumar.Velug...@ubs.com
Subject RE: AdoNetAppender: logging via stored proc:
Date Mon, 22 May 2006 14:11:54 GMT
 
Never mind, I got it...again I have a typo in the "parameterName"

Thanks,
Kumar
-----Original Message-----
From: Velugula, Kumar 
Sent: Monday, May 22, 2006 9:36 AM
To: 'Log4NET User'
Subject: RE: AdoNetAppender: logging via stored proc:

Hi,

I am trying to log to database using stored proc instead of the insert
text in the config file...my config file adonet appender is as
follows...
<appender name="AdoNetAppender_Oracle"
type="log4net.Appender.ADONetAppender">
		<connectionType
value="System.Data.OracleClient.OracleConnection,
System.Data.OracleClient, Version=1.0.5000.0, Culture=neutral,
PublicKeyToken=b77a5c561934e089" />
		<connectionString value="data source=*****.WORLD;User
ID=******;Password=*****;" />
			<commandText value="pkg_test.insert_log" />
			<commandType value="StoredProcedure" />
			<bufferSize value="1" />
			<parameter>
				<parameterName value="p_date" />
				<dbType value="DateTime" />
				<layout
type="log4net.Layout.RawTimeStampLayout" />
			</parameter>
			<parameter>
				<parameterName value="p_thread" />
				<dbType value="String" />
				<size value="255" />
				<layout
type="log4net.Layout.PatternLayout">
					<conversionPattern
value="%thread" />
				</layout>
			</parameter>
			<parameter>
				<pParameterName value="p_log_level" />
				<dbType value="String" />
				<size value="50" />
				<layout
type="log4net.Layout.PatternLayout">
					<conversionPattern
value="%level" />
				</layout>
			</parameter>
			<parameter>
				<parameterName value="p_logger" />
				<dbType value="String" />
				<size value="255" />
				<layout
type="log4net.Layout.PatternLayout">
					<conversionPattern
value="%logger" />
				</layout>
			</parameter>
			<parameter>
				<parameterName value="p_message" />
				<dbType value="String" />
				<size value="4000" />
				<layout
type="log4net.Layout.PatternLayout">
					<conversionPattern
value="%message" />
				</layout>
			</parameter>
	</appender>

Could you please tell me whats wrong with the config elements?

Thanks,
Kumar 

-----Original Message-----
From: Velugula, Kumar
Sent: Monday, May 22, 2006 9:20 AM
To: 'Log4NET User'
Subject: RE: AdoNetAppender:

I greatly appreciate it. Thanks it works after changing the appender
name from "log4net.Appender.AdoNetAppender" to
"log4net.Appender.ADONetAppender"

Regards,
Kumar
-----Original Message-----
From: Ron Grabowski [mailto:rongrabowski@yahoo.com]
Sent: Thursday, May 18, 2006 11:20 PM
To: Log4NET User
Subject: Re: AdoNetAppender:

What version of log4net are you using? Older versions of log4net used
log4net.Appender.ADONetAppender as the type name. The documentation on
the website is for log4net 1.2.10.


> 
> > Hi
> > 
> > I am trying to log messages to Oracle 9i database table 'Log". I am 
> > getting error while initializing AdoNetAppender...following is the 
> > log...
> > 
> > log4net:ERROR DOMConfigurator: Could not create Appender 
> > [AdoNetAppender_Oracle] of type [log4net.Appender.AdoNetAppender].
> > Reported error follows.
> > log4net:ERROR DOMConfigurator: Could not create Appender 
> > [AdoNetAppender_Oracle] of type [log4net.Appender.AdoNetAppender].
> > Reported error follows.
> > System.TypeLoadException: Could not load type 
> > log4net.Appender.AdoNetAppender from assembly log4net-net-1.1, 
> > Version=1.2.0.30316, Culture=neutral, PublicKeyToken=null.
> >    at System.Reflection.Assembly.GetType(String name, Boolean
> > throwOnError)
> >    at log4net.helpers.SystemInfo.GetTypeFromString(Assembly
> > relativeAssembly, String typeName, Boolean throwOnError)
> >    at log4net.helpers.SystemInfo.GetTypeFromString(String typeName, 
> > Boolean throwOnError)
> >    at
> >
>
log4net.Repository.Hierarchy.DOMHierarchyConfigurator.ParseAppender(Xm
> > lElement appenderElement)
> > log4net:ERROR DOMConfigurator: Appender named
> [AdoNetAppender_Oracle]
> > not found.
> > System.TypeLoadException: Could not load type 
> > log4net.Appender.AdoNetAppender from assembly log4net-net-1.1, 
> > Version=1.2.0.30316, Culture=neutral, PublicKeyToken=null.
> >    at System.Reflection.Assembly.GetType(String name, Boolean
> > throwOnError)
> >    at log4net.helpers.SystemInfo.GetTypeFromString(Assembly
> > relativeAssembly, String typeName, Boolean throwOnError)
> >    at log4net.helpers.SystemInfo.GetTypeFromString(String typeName, 
> > Boolean throwOnError)
> >    at
> >
>
log4net.Repository.Hierarchy.DOMHierarchyConfigurator.ParseAppender(Xm
> > lElement appenderElement)
> > log4net:ERROR DOMConfigurator: Appender named
> [AdoNetAppender_Oracle]
> > not found.
> > 
> > 
> > Configuration section ....
> > 
> > 	<appender name="AdoNetAppender_Oracle"
> > type="log4net.Appender.AdoNetAppender">

Visit our website at http://www.ubs.com

This message contains confidential information and is intended only 
for the individual named.  If you are not the named addressee you 
should not disseminate, distribute or copy this e-mail.  Please 
notify the sender immediately by e-mail if you have received this 
e-mail by mistake and delete this e-mail from your system.

E-mail transmission cannot be guaranteed to be secure or error-free 
as information could be intercepted, corrupted, lost, destroyed, 
arrive late or incomplete, or contain viruses.  The sender therefore 
does not accept liability for any errors or omissions in the contents 
of this message which arise as a result of e-mail transmission.  If 
verification is required please request a hard-copy version.  This 
message is provided for informational purposes and should not be 
construed as a solicitation or offer to buy or sell any securities or 
related financial instruments.


Mime
View raw message