logging-log4net-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Usman Uppal" <uup...@salesforce.com>
Subject FW: LOG4NET - Oracle 9i logging error
Date Tue, 28 Jun 2005 13:59:10 GMT
Thanks for your help. 

 

I copied the appender from
http://logging.apache.org/log4net/release/config-examples.html#adonetapp
ender-o9.

 

Here is the appender. Do you see anything wrong here?

 

Usman

 

    <appender name="AdoNetAppender_Oracle"
type="log4net.Appender.AdoNetAppender">

            <connectionType
value="System.Data.OracleClient.OracleConnection,
System.Data.OracleClient, Version=1.0.3300.0, Culture=neutral,
PublicKeyToken=b77a5c561934e089" />

            <connectionString value="data source=DEVORLC.WORLD;User
ID=username;Password=password" />

            <commandText value="INSERT INTO SF_log
(Datetime,Thread,Log_Level,Logger,Message) VALUES (:log_date, :thread,
:log_level, :logger, :message)" />

            <bufferSize value="128" />

            <parameter>

                  <parameterName value=":log_date" />

                  <dbType value="DateTime" />

                  <layout type="log4net.Layout.RawTimeStampLayout" />

            </parameter>

            <parameter>

                  <parameterName value=":thread" />

                  <dbType value="String" />

                  <size value="255" />

                  <layout type="log4net.Layout.PatternLayout">

                        <conversionPattern value="%thread" />

                  </layout>

            </parameter>

            <parameter>

                  <parameterName value=":log_level" />

                  <dbType value="String" />

                  <size value="50" />

                  <layout type="log4net.Layout.PatternLayout">

                        <conversionPattern value="%level" />

                  </layout>

            </parameter>

            <parameter>

                  <parameterName value=":logger" />

                  <dbType value="String" />

                  <size value="255" />

                  <layout type="log4net.Layout.PatternLayout">

                        <conversionPattern value="%logger" />

                  </layout>

            </parameter>

            <parameter>

                  <parameterName value=":message" />

                  <dbType value="String" />

                  <size value="4000" />

                  <layout type="log4net.Layout.PatternLayout">

                        <conversionPattern value="%message" />

                  </layout>

            </parameter>

            <filter type="log4net.Filter.LevelRangeFilter">

                  <param name="LevelMin" value="DEBUG"/>

                  <param name="LevelMax" value="INFO"/>

            </filter>

      </appender>

 

 

  _____  

From: Usman Uppal 
Sent: Monday, June 27, 2005 8:33 PM
To: 'log4net-user@logging.apache.org'
Subject: FW: LOG4NET - Oracle 9i logging error

 

Thank You for clearing error in my previous email. All my messages are
going to the log file, nothing gets written to Oracle table and there
are no more errors in debug. Need help. Here is the copy of the debug
log file.

Do I need to write some code to log to Oracle of code for logging to log
file should automatically write to Oracle db?

 

Thanks, usman

 

log4net: DOMConfigurator: Created Appender [LogFileAppender]

log4net: DOMConfigurator: Adding appender named [LogFileAppender] to
logger [roo

t].

log4net: DOMConfigurator: Loading Appender [ConsoleAppender] type:
[log4net.Appe

nder.ConsoleAppender]

log4net: DOMConfigurator: Setting Property [ConversionPattern] to String
value [

%d [%t] %-5p %c [%x] <%X{auth}> - %m%n]

log4net: DOMConfigurator: Setting Property [Layout] to object
[log4net.Layout.Pa

tternLayout]

log4net: DOMConfigurator: Setting Property [LevelMin] to Level value
[DEBUG]

log4net: DOMConfigurator: Setting Property [LevelMax] to Level value
[INFO]

log4net: DOMConfigurator: Setting Collection Property [AddFilter] to
object [log

4net.Filter.LevelRangeFilter]

log4net: DOMConfigurator: Created Appender [ConsoleAppender]

log4net: DOMConfigurator: Adding appender named [ConsoleAppender] to
logger [roo

t].

log4net: DOMConfigurator: Loading Appender [AdoNetAppender_Oracle] type:
[log4ne

t.Appender.AdoNetAppender]

log4net: DOMConfigurator: Setting Property [ConnectionType] to String
value [Sys

tem.Data.OracleClient.OracleConnection, System.Data.OracleClient,
Version=1.0.33

00.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]

log4net: DOMConfigurator: Setting Property [ConnectionString] to String
value [d

ata source=DEVORLC.WORLD;User ID=username;Password=password]

log4net: DOMConfigurator: Setting Property [CommandText] to String value
[INSERT

 INTO SF_log (Datetime,Thread,Log_Level,Logger,Message) VALUES
(:log_date, :thre

ad, :log_level, :logger, :message)]

log4net: DOMConfigurator: Setting Property [BufferSize] to Int32 value
[128]

log4net: DOMConfigurator: Setting Property [ParameterName] to String
value [:log

_date]

log4net: DOMConfigurator: Setting Property [DbType] to DbType value
[DateTime]

log4net: DOMConfigurator: Setting Property [Layout] to object
[log4net.Layout.Ra

wTimeStampLayout]

log4net: DOMConfigurator: Setting Collection Property [AddParameter] to
object [

log4net.Appender.ADONetAppenderParameter]

log4net: DOMConfigurator: Setting Property [ParameterName] to String
value [:thr

ead]

log4net: DOMConfigurator: Setting Property [DbType] to DbType value
[String]

log4net: DOMConfigurator: Setting Property [Size] to Int32 value [255]

log4net: DOMConfigurator: Setting Property [ConversionPattern] to String
value [

%thread]

log4net: DOMConfigurator: Setting Property [Layout] to object
[log4net.Layout.La

yout2RawLayoutAdapter]

log4net: DOMConfigurator: Setting Collection Property [AddParameter] to
object [

log4net.Appender.ADONetAppenderParameter]

log4net: DOMConfigurator: Setting Property [ParameterName] to String
value [:log

_level]

log4net: DOMConfigurator: Setting Property [DbType] to DbType value
[String]

log4net: DOMConfigurator: Setting Property [Size] to Int32 value [50]

log4net: DOMConfigurator: Setting Property [ConversionPattern] to String
value [

%level]

log4net: DOMConfigurator: Setting Property [Layout] to object
[log4net.Layout.La

yout2RawLayoutAdapter]

log4net: DOMConfigurator: Setting Collection Property [AddParameter] to
object [

log4net.Appender.ADONetAppenderParameter]

log4net: DOMConfigurator: Setting Property [ParameterName] to String
value [:log

ger]

log4net: DOMConfigurator: Setting Property [DbType] to DbType value
[String]

log4net: DOMConfigurator: Setting Property [Size] to Int32 value [255]

log4net: DOMConfigurator: Setting Property [ConversionPattern] to String
value [

%logger]

log4net: DOMConfigurator: Setting Property [Layout] to object
[log4net.Layout.La

yout2RawLayoutAdapter]

log4net: DOMConfigurator: Setting Collection Property [AddParameter] to
object [

log4net.Appender.ADONetAppenderParameter]

log4net: DOMConfigurator: Setting Property [ParameterName] to String
value [:mes

sage]

log4net: DOMConfigurator: Setting Property [DbType] to DbType value
[String]

log4net: DOMConfigurator: Setting Property [Size] to Int32 value [4000]

log4net: DOMConfigurator: Setting Property [ConversionPattern] to String
value [

%message]

log4net: DOMConfigurator: Setting Property [Layout] to object
[log4net.Layout.La

yout2RawLayoutAdapter]

log4net: DOMConfigurator: Setting Collection Property [AddParameter] to
object [

log4net.Appender.ADONetAppenderParameter]

log4net: DOMConfigurator: Created Appender [AdoNetAppender_Oracle]

log4net: DOMConfigurator: Adding appender named [AdoNetAppender_Oracle]
to logge

r [root].

log4net: DOMConfigurator: Hierarchy Threshold []

  _____  


Mime
View raw message