logging-log4net-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Steve Hueners <am.st...@gmail.com>
Subject AdoNetAppender on Azure SQL: Works then quits working
Date Mon, 18 Aug 2014 20:07:50 GMT
Last week I stepped thru the hoops required to configure a connection
string for my Azure SQL  db and confirmed that logging was working as
expected. Log messages were stored for several days, but at some
point, the logging ceased. I re-published the site (without changing
anything related to Log4Net) and logging was again active. Any other
similar reports? Anything non-optimal with my config?

much appreciated!

    <appender name="AdoNetAppender" type="log4net.Appender.AdoNetAppender">
      <bufferSize value="1" />
      <connectionType value="System.Data.SqlClient.SqlConnection,
System.Data,  Version=4.0.0.0, Culture=neutral,
PublicKeyToken=b77a5c561934e089" />

      <connectionString
value="Server=tcp:myServer.database.windows.net,1433;Database=myDatabase;User
ID=myUser;Password=myPassword;Trusted_Connection=False;Encrypt=True;Connection
Timeout=30;" />
      <commandText value="INSERT INTO CULog
([Date],[Level],[Message],[Exception], Logger) VALUES (@log_date,
@log_level, @message, @exception, @logger)" />
      <parameter>
        <parameterName value="@log_date" />
        <dbType value="DateTime" />
        <layout type="log4net.Layout.RawTimeStampLayout" />
      </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="@message" />
        <dbType value="String" />
        <size value="4000" />
        <layout type="log4net.Layout.PatternLayout">
          <conversionPattern value="%message" />
        </layout>
      </parameter>

      <parameter>
        <parameterName value="@exception" />
        <dbType value="String" />
        <size value="4000" />
        <layout type="log4net.Layout.ExceptionLayout" />
      </parameter>
      <parameter>
        <parameterName value="@logger" />
        <dbType value="String" />
        <size value="4000" />
        <layout type="log4net.Layout.PatternLayout">
          <conversionPattern value="%logger" />
        </layout>
      </parameter>

Mime
View raw message