List Info

Thread: Created: (LOG4NET-152) getting AsoNetAppender to work




Created: (LOG4NET-152) getting AsoNetAppender to work
country flaguser name
United States
2008-05-06 11:20:55
getting AsoNetAppender to work
------------------------------

                 Key: LOG4NET-152
                 URL: htt
ps://issues.apache.org/jira/browse/LOG4NET-152
             Project: Log4net
          Issue Type: Improvement
    Affects Versions: 1.2.10
         Environment: windows asp.net c#
            Reporter: m


I've been trying to get log4net to work with asp.net 2.0 and
a database table. Here is the config file:

<configSections>
<section name="log4net"
type="log4net.Config.Log4NetConfigurationSectionHandler
, log4net" />
</configSections>

<log4net>
<appender name="AdoNetAppender"
type="log4net.Appender.AdoNetAppender">
<bufferSize value="1" />
<connectionType
value="System.Data.SqlClient.SqlConnection,
System.Data, Version=1.2.10.0, Culture=neutral,
PublicKeyToken=b77a5c561934e089" />
<connectionString
value="server=CJISDEVSQL01;database=EventLog;integrated
security=true;" />
<commandText value="exec LD80Event_CREATE eventDate, logLevel, message, exception, updateUserName" />
<parameter>
<parameterName value="eventDate" />
<dbType value="DateTime" />
<layout
type="log4net.Layout.RawTimeStampLayout" />
</parameter>
<parameter>
<parameterName value="logLevel" />
<dbType value="String" />
<size value="512" />
<layout
type="log4net.Layout.PatternLayout">
<conversionPattern value="%p" />
</layout>
</parameter>
<parameter>
<parameterName value="message" />
<dbType value="String" />
<size value="4000" />
<layout
type="log4net.Layout.PatternLayout">
<conversionPattern value="%m" />
</layout>
</parameter>
<parameter>
<parameterName value="exception" />
<dbType value="String" />
<size value="4000" />
<layout type="log4net.Layout.ExceptionLayout"
/>
</parameter>
<parameter>
<parameterName value="updateUserName" />
<dbType value="String" />
<size value="50" />
<layout
type="log4net.Layout.PatternLayout">
<conversionPattern value="%p" />
</layout>
</parameter>
</appender>
<logger name="eventLog">
<level value="ALL" />
<appender-ref ref="AdoNetAppender" />
</logger>
<root>
<level value="ALL" />
<appender-ref ref="AdoNetAppender" />
</root>
</log4net>

This is the line of code in Global.asax, Application_Start
method:
log4net.Config.XmlConfigurator.Configure();

This is in the default page:
private static readonly ILog eventLog =
LogManager.GetLogger(System.Reflection.MethodBase.GetCurrent
Method().DeclaringType);

The issue is all the properties are 'always' set to false
when the application is running and 'nothing' is ever
written to the database. I have been searching the web for a
week now and I can not find any information that has made a
difference.

Can you help with this problem?

Thank you. 

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


Resolved: (LOG4NET-152) getting AsoNetAppender to work
country flaguser name
United States
2008-05-06 16:41:55
     [ https://issues.apache.org/jira/browse/LOG4NET-152?page=co
m.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Ron Grabowski resolved LOG4NET-152.
-----------------------------------

    Resolution: Invalid

Please post general questions about log4net to the mailing
list.

I don't think there is a v1.2.10 of System.Data:

<connectionType
value="System.Data.SqlClient.SqlConnection,
System.Data, Version=1.2.10.0, Culture=neutral,
PublicKeyToken=b77a5c561934e089" /> 

> getting AsoNetAppender to work
> ------------------------------
>
>                 Key: LOG4NET-152
>                 URL: htt
ps://issues.apache.org/jira/browse/LOG4NET-152
>             Project: Log4net
>          Issue Type: Improvement
>    Affects Versions: 1.2.10
>         Environment: windows asp.net c#
>            Reporter: m
>
> I've been trying to get log4net to work with asp.net
2.0 and a database table. Here is the config file:
> <configSections>
> <section name="log4net"
type="log4net.Config.Log4NetConfigurationSectionHandler
, log4net" />
> </configSections>
> <log4net>
> <appender name="AdoNetAppender"
type="log4net.Appender.AdoNetAppender">
> <bufferSize value="1" />
> <connectionType
value="System.Data.SqlClient.SqlConnection,
System.Data, Version=1.2.10.0, Culture=neutral,
PublicKeyToken=b77a5c561934e089" />
> <connectionString
value="server=CJISDEVSQL01;database=EventLog;integrated
security=true;" />
> <commandText value="exec LD80Event_CREATE eventDate, logLevel, message, exception, updateUserName" />
> <parameter>
> <parameterName value="eventDate" />
> <dbType value="DateTime" />
> <layout
type="log4net.Layout.RawTimeStampLayout" />
> </parameter>
> <parameter>
> <parameterName value="logLevel" />
> <dbType value="String" />
> <size value="512" />
> <layout
type="log4net.Layout.PatternLayout">
> <conversionPattern value="%p" />
> </layout>
> </parameter>
> <parameter>
> <parameterName value="message" />
> <dbType value="String" />
> <size value="4000" />
> <layout
type="log4net.Layout.PatternLayout">
> <conversionPattern value="%m" />
> </layout>
> </parameter>
> <parameter>
> <parameterName value="exception" />
> <dbType value="String" />
> <size value="4000" />
> <layout
type="log4net.Layout.ExceptionLayout" />
> </parameter>
> <parameter>
> <parameterName value="updateUserName" />
> <dbType value="String" />
> <size value="50" />
> <layout
type="log4net.Layout.PatternLayout">
> <conversionPattern value="%p" />
> </layout>
> </parameter>
> </appender>
> <logger name="eventLog">
> <level value="ALL" />
> <appender-ref ref="AdoNetAppender" />
> </logger>
> <root>
> <level value="ALL" />
> <appender-ref ref="AdoNetAppender" />
> </root>
> </log4net>
> This is the line of code in Global.asax,
Application_Start method:
> log4net.Config.XmlConfigurator.Configure();
> This is in the default page:
> private static readonly ILog eventLog =
LogManager.GetLogger(System.Reflection.MethodBase.GetCurrent
Method().DeclaringType);
> The issue is all the properties are 'always' set to
false when the application is running and 'nothing' is ever
written to the database. I have been searching the web for a
week now and I can not find any information that has made a
difference.
> Can you help with this problem?
> Thank you. 

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


Commented: (LOG4NET-152) getting AsoNetAppender to work
country flaguser name
United States
2008-05-07 09:42:57
    [ https:/
/issues.apache.org/jira/browse/LOG4NET-152?page=com.atlassia
n.jira.plugin.system.issuetabpanels:comment-tabpanel&foc
usedCommentId=12594926#action_12594926 ] 

m commented on LOG4NET-152:
---------------------------

You can put any number you want in there, it still doesn't
work.

Michelle Courier Brannon
ITD Software Engineer
805.781.5061



"Ron Grabowski (JIRA)" <jiraapache.org> 
05/06/2008 02:41 PM

To
mcourierco.slo.ca.us
cc

Subject
[jira] Resolved: (LOG4NET-152) getting AsoNetAppender to
work







     [ 
https://issues.apache.org/jira/browse/LOG4NET-152?page=co
m.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel 
]

Ron Grabowski resolved LOG4NET-152.
-----------------------------------

    Resolution: Invalid

Please post general questions about log4net to the mailing
list.

I don't think there is a v1.2.10 of System.Data:

<connectionType
value="System.Data.SqlClient.SqlConnection,
System.Data, 
Version=1.2.10.0, Culture=neutral,
PublicKeyToken=b77a5c561934e089" /> 

table. Here is the config file:
type="log4net.Config.Log4NetConfigurationSectionHandler
, log4net" />
Version=1.2.10.0, Culture=neutral,
PublicKeyToken=b77a5c561934e089" />
value="server=CJISDEVSQL01;database=EventLog;integrated
security=true;" />
message, exception, updateUserName" />
LogManager.GetLogger(System.Reflection.MethodBase.GetCurrent
Method().DeclaringType);
application is running and 'nothing' is ever written to the
database. I 
have been searching the web for a week now and I can not
find any 
information that has made a difference.

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




> getting AsoNetAppender to work
> ------------------------------
>
>                 Key: LOG4NET-152
>                 URL: htt
ps://issues.apache.org/jira/browse/LOG4NET-152
>             Project: Log4net
>          Issue Type: Improvement
>    Affects Versions: 1.2.10
>         Environment: windows asp.net c#
>            Reporter: m
>
> I've been trying to get log4net to work with asp.net
2.0 and a database table. Here is the config file:
> <configSections>
> <section name="log4net"
type="log4net.Config.Log4NetConfigurationSectionHandler
, log4net" />
> </configSections>
> <log4net>
> <appender name="AdoNetAppender"
type="log4net.Appender.AdoNetAppender">
> <bufferSize value="1" />
> <connectionType
value="System.Data.SqlClient.SqlConnection,
System.Data, Version=1.2.10.0, Culture=neutral,
PublicKeyToken=b77a5c561934e089" />
> <connectionString
value="server=CJISDEVSQL01;database=EventLog;integrated
security=true;" />
> <commandText value="exec LD80Event_CREATE eventDate, logLevel, message, exception, updateUserName" />
> <parameter>
> <parameterName value="eventDate" />
> <dbType value="DateTime" />
> <layout
type="log4net.Layout.RawTimeStampLayout" />
> </parameter>
> <parameter>
> <parameterName value="logLevel" />
> <dbType value="String" />
> <size value="512" />
> <layout
type="log4net.Layout.PatternLayout">
> <conversionPattern value="%p" />
> </layout>
> </parameter>
> <parameter>
> <parameterName value="message" />
> <dbType value="String" />
> <size value="4000" />
> <layout
type="log4net.Layout.PatternLayout">
> <conversionPattern value="%m" />
> </layout>
> </parameter>
> <parameter>
> <parameterName value="exception" />
> <dbType value="String" />
> <size value="4000" />
> <layout
type="log4net.Layout.ExceptionLayout" />
> </parameter>
> <parameter>
> <parameterName value="updateUserName" />
> <dbType value="String" />
> <size value="50" />
> <layout
type="log4net.Layout.PatternLayout">
> <conversionPattern value="%p" />
> </layout>
> </parameter>
> </appender>
> <logger name="eventLog">
> <level value="ALL" />
> <appender-ref ref="AdoNetAppender" />
> </logger>
> <root>
> <level value="ALL" />
> <appender-ref ref="AdoNetAppender" />
> </root>
> </log4net>
> This is the line of code in Global.asax,
Application_Start method:
> log4net.Config.XmlConfigurator.Configure();
> This is in the default page:
> private static readonly ILog eventLog =
LogManager.GetLogger(System.Reflection.MethodBase.GetCurrent
Method().DeclaringType);
> The issue is all the properties are 'always' set to
false when the application is running and 'nothing' is ever
written to the database. I have been searching the web for a
week now and I can not find any information that has made a
difference.
> Can you help with this problem?
> Thank you. 

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


Commented: (LOG4NET-152) getting AsoNetAppender to work
country flaguser name
United States
2008-05-07 16:53:55
    [ https:/
/issues.apache.org/jira/browse/LOG4NET-152?page=com.atlassia
n.jira.plugin.system.issuetabpanels:comment-tabpanel&foc
usedCommentId=12595055#action_12595055 ] 

Ron Grabowski commented on LOG4NET-152:
---------------------------------------

Instead of relying on people guessing what your error is, I
suggest you read the faq on how to enable internal debug
messages so you can see what log4net says the problem is:

 How do I enable log4net internal debugging?
 ht
tp://logging.apache.org/log4net/release/faq.html

This is essentially what log4net is doing in code:

Type connectionType =
Type.GetType("System.Data.SqlClient.SqlConnection,
System.Data, Version=1.2.10.0, Culture=neutral,
PublicKeyToken=b77a5c561934e089");
using (connection)
{
    connection.ConnectionString =
"server=CJISDEVSQL01;database=EventLog;integrated
security=true;"
    connection.Open();
    Assert.IsTrue(connection.State ==
ConnectionState.Open);
}

If that doesn't work then the AdoNetAppender won't work. My
point about System.Data and the 1.2.10.0 version number is
that there is no 1.2.10 version of System.Data. There is a
2.0.0.0 version:

 System.Data.SqlClient.SqlConnection, System.Data,
Version=2.0.0.0, Culture=neutral,
PublicKeyToken=b77a5c561934e089

That may or may not be the problem. I'm just guessing...you
should enable internal debugging to learn what the real
issue is.


 




> getting AsoNetAppender to work
> ------------------------------
>
>                 Key: LOG4NET-152
>                 URL: htt
ps://issues.apache.org/jira/browse/LOG4NET-152
>             Project: Log4net
>          Issue Type: Improvement
>    Affects Versions: 1.2.10
>         Environment: windows asp.net c#
>            Reporter: m
>
> I've been trying to get log4net to work with asp.net
2.0 and a database table. Here is the config file:
> <configSections>
> <section name="log4net"
type="log4net.Config.Log4NetConfigurationSectionHandler
, log4net" />
> </configSections>
> <log4net>
> <appender name="AdoNetAppender"
type="log4net.Appender.AdoNetAppender">
> <bufferSize value="1" />
> <connectionType
value="System.Data.SqlClient.SqlConnection,
System.Data, Version=1.2.10.0, Culture=neutral,
PublicKeyToken=b77a5c561934e089" />
> <connectionString
value="server=CJISDEVSQL01;database=EventLog;integrated
security=true;" />
> <commandText value="exec LD80Event_CREATE eventDate, logLevel, message, exception, updateUserName" />
> <parameter>
> <parameterName value="eventDate" />
> <dbType value="DateTime" />
> <layout
type="log4net.Layout.RawTimeStampLayout" />
> </parameter>
> <parameter>
> <parameterName value="logLevel" />
> <dbType value="String" />
> <size value="512" />
> <layout
type="log4net.Layout.PatternLayout">
> <conversionPattern value="%p" />
> </layout>
> </parameter>
> <parameter>
> <parameterName value="message" />
> <dbType value="String" />
> <size value="4000" />
> <layout
type="log4net.Layout.PatternLayout">
> <conversionPattern value="%m" />
> </layout>
> </parameter>
> <parameter>
> <parameterName value="exception" />
> <dbType value="String" />
> <size value="4000" />
> <layout
type="log4net.Layout.ExceptionLayout" />
> </parameter>
> <parameter>
> <parameterName value="updateUserName" />
> <dbType value="String" />
> <size value="50" />
> <layout
type="log4net.Layout.PatternLayout">
> <conversionPattern value="%p" />
> </layout>
> </parameter>
> </appender>
> <logger name="eventLog">
> <level value="ALL" />
> <appender-ref ref="AdoNetAppender" />
> </logger>
> <root>
> <level value="ALL" />
> <appender-ref ref="AdoNetAppender" />
> </root>
> </log4net>
> This is the line of code in Global.asax,
Application_Start method:
> log4net.Config.XmlConfigurator.Configure();
> This is in the default page:
> private static readonly ILog eventLog =
LogManager.GetLogger(System.Reflection.MethodBase.GetCurrent
Method().DeclaringType);
> The issue is all the properties are 'always' set to
false when the application is running and 'nothing' is ever
written to the database. I have been searching the web for a
week now and I can not find any information that has made a
difference.
> Can you help with this problem?
> Thank you. 

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


Commented: (LOG4NET-152) getting AsoNetAppender to work
country flaguser name
United States
2008-05-08 10:46:57
    [ https:/
/issues.apache.org/jira/browse/LOG4NET-152?page=com.atlassia
n.jira.plugin.system.issuetabpanels:comment-tabpanel&foc
usedCommentId=12595296#action_12595296 ] 

m commented on LOG4NET-152:
---------------------------

Thank you for the tip about how to debug log4net. I was able
to track down 
the issues:

Your SDK documentation at 
http://logging.apache.org/log4net/release/sdk/index.html
 has a sample of 
the 'configSections' which is incorrect. I had to change
this to:
        <section name="log4net" 
type="log4net.Config.Log4NetConfigurationSectionHandler
" 
requirePermission="false" />

I also had to add the connection string to the 'appSettings'
section of 
the config file, log4net could not find the
'connectionString' in the 
'log4net', 'appender' section of the config file.

Your reply ('Resolution: Invalid') to my original inquiry
and your 
statement ('Instead of relying on people guessing what your
error is') 
were totally incorrect and I really hope you will be kinder
to other 
developers in the future.

Thank you,
Michelle




"Ron Grabowski (JIRA)" <jiraapache.org> 
05/07/2008 02:53 PM

To
mcourierco.slo.ca.us
cc

Subject
[jira] Commented: (LOG4NET-152) getting AsoNetAppender to
work







    [ 
https:/
/issues.apache.org/jira/browse/LOG4NET-152?page=com.atlassia
n.jira.plugin.system.issuetabpanels:comment-tabpanel&foc
usedCommentId=12595055#action_12595055 
] 

Ron Grabowski commented on LOG4NET-152:
---------------------------------------

Instead of relying on people guessing what your error is, I
suggest you 
read the faq on how to enable internal debug messages so you
can see what 
log4net says the problem is:

 How do I enable log4net internal debugging?
 ht
tp://logging.apache.org/log4net/release/faq.html

This is essentially what log4net is doing in code:

Type connectionType =
Type.GetType("System.Data.SqlClient.SqlConnection, 
System.Data, Version=1.2.10.0, Culture=neutral, 
PublicKeyToken=b77a5c561934e089");
using (connection)
{
    connection.ConnectionString = 
"server=CJISDEVSQL01;database=EventLog;integrated
security=true;"
    connection.Open();
    Assert.IsTrue(connection.State ==
ConnectionState.Open);
}

If that doesn't work then the AdoNetAppender won't work. My
point about 
System.Data and the 1.2.10.0 version number is that there is
no 1.2.10 
version of System.Data. There is a 2.0.0.0 version:

 System.Data.SqlClient.SqlConnection, System.Data,
Version=2.0.0.0, 
Culture=neutral, PublicKeyToken=b77a5c561934e089

That may or may not be the problem. I'm just guessing...you
should enable 
internal debugging to learn what the real issue is.


 




table. Here is the config file:
type="log4net.Config.Log4NetConfigurationSectionHandler
, log4net" />
Version=1.2.10.0, Culture=neutral,
PublicKeyToken=b77a5c561934e089" />
value="server=CJISDEVSQL01;database=EventLog;integrated
security=true;" />
message, exception, updateUserName" />
LogManager.GetLogger(System.Reflection.MethodBase.GetCurrent
Method().DeclaringType);
application is running and 'nothing' is ever written to the
database. I 
have been searching the web for a week now and I can not
find any 
information that has made a difference.

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




> getting AsoNetAppender to work
> ------------------------------
>
>                 Key: LOG4NET-152
>                 URL: htt
ps://issues.apache.org/jira/browse/LOG4NET-152
>             Project: Log4net
>          Issue Type: Improvement
>    Affects Versions: 1.2.10
>         Environment: windows asp.net c#
>            Reporter: m
>
> I've been trying to get log4net to work with asp.net
2.0 and a database table. Here is the config file:
> <configSections>
> <section name="log4net"
type="log4net.Config.Log4NetConfigurationSectionHandler
, log4net" />
> </configSections>
> <log4net>
> <appender name="AdoNetAppender"
type="log4net.Appender.AdoNetAppender">
> <bufferSize value="1" />
> <connectionType
value="System.Data.SqlClient.SqlConnection,
System.Data, Version=1.2.10.0, Culture=neutral,
PublicKeyToken=b77a5c561934e089" />
> <connectionString
value="server=CJISDEVSQL01;database=EventLog;integrated
security=true;" />
> <commandText value="exec LD80Event_CREATE eventDate, logLevel, message, exception, updateUserName" />
> <parameter>
> <parameterName value="eventDate" />
> <dbType value="DateTime" />
> <layout
type="log4net.Layout.RawTimeStampLayout" />
> </parameter>
> <parameter>
> <parameterName value="logLevel" />
> <dbType value="String" />
> <size value="512" />
> <layout
type="log4net.Layout.PatternLayout">
> <conversionPattern value="%p" />
> </layout>
> </parameter>
> <parameter>
> <parameterName value="message" />
> <dbType value="String" />
> <size value="4000" />
> <layout
type="log4net.Layout.PatternLayout">
> <conversionPattern value="%m" />
> </layout>
> </parameter>
> <parameter>
> <parameterName value="exception" />
> <dbType value="String" />
> <size value="4000" />
> <layout
type="log4net.Layout.ExceptionLayout" />
> </parameter>
> <parameter>
> <parameterName value="updateUserName" />
> <dbType value="String" />
> <size value="50" />
> <layout
type="log4net.Layout.PatternLayout">
> <conversionPattern value="%p" />
> </layout>
> </parameter>
> </appender>
> <logger name="eventLog">
> <level value="ALL" />
> <appender-ref ref="AdoNetAppender" />
> </logger>
> <root>
> <level value="ALL" />
> <appender-ref ref="AdoNetAppender" />
> </root>
> </log4net>
> This is the line of code in Global.asax,
Application_Start method:
> log4net.Config.XmlConfigurator.Configure();
> This is in the default page:
> private static readonly ILog eventLog =
LogManager.GetLogger(System.Reflection.MethodBase.GetCurrent
Method().DeclaringType);
> The issue is all the properties are 'always' set to
false when the application is running and 'nothing' is ever
written to the database. I have been searching the web for a
week now and I can not find any information that has made a
difference.
> Can you help with this problem?
> Thank you. 

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


Commented: (LOG4NET-152) getting AsoNetAppender to work
country flaguser name
United States
2008-05-08 16:34:59
    [
HTTPS://ISSUES.APACHE.ORG/JIRA/BROWSE/LOG4NET-152?PAGE=COM.A
TLASSIAN.JIRA.PLUGIN.SYSTEM.ISSUETABPANELS:COMMENT-TABPANEL&
amp;FOCUSEDCOMMENTID=12595401#ACTION_12595401 ] 

RON GRABOWSKI COMMENTED ON LOG4NET-152:
---------------------------------------

THIS TICKET WAS MARKED AS INVALID BECAUSE THERE WASN'T A
MAJOR DEFECT IN THE LOG4NET CODE. THE LOG4NET BUG TRACKING
SYSTEM IS NOT DESIGNED TO BE A GENERAL SUPPORT AREA. THERE
ARE TWO MAILING LISTS FOR HELPING USERS AND DEVELOPERS OF
LOG4NET. BELIEVE IT OR NOT ITS RATHER DIFFICULT TO DIAGNOSE
WHY A 50+ LINE SNIPPET OF XML JUST DOESN'T WORK. I LOOKED AT
YOUR XML AND MADE A GUESS WHY IT WASN'T WORKING. YES, MY
GUESS WAS TOTALLY INCORRECT...THAT'S ONE OF THE RISKS ONE
TAKES WHEN MAKING A GUESS. WITHOUT A STACK TRACE, AN ERROR
MESSAGE, AND LITTLE KNOWLEDGE OF YOUR ENVIRONMENT WHAT
SHOULD I HAVE GUESSED? THE PART ABOUT RUNNING IN MEDIUM
TRUST WAS A RATHER LARGE DETAIL TO LEAVE OUT. MEDIUM TRUST
IS TRICKY...ESPECIALLY FOR 3RD PARTY LIBRARIES. IF YOU WANT
TO UPDATE THE DOCUMENTATION AND PROVIDE A PATCH EXPLAINING
SOME OF THE NUANCES WITH LOG4NET IN MEDIUM TRUST AND LOW
TRUST ENVIRONMENTS I'LL GLADLY COMMIT IT FOR THE BENEFIT OF
EVERYONE. REMEMBER, YOU'RE GETTING FREE SUPPORT FOR A FREE
SOFTWARE PACKAGE. YOU'LL GET MORE FREE SUPPORT (NOT ONLY
FROM ME BUT FROM OTHER LOG4NET USERS) ON THE MAILING LISTS.


THE CONNECTIONSTRING PROPERTY WAS RECENTLY ADDED TO LOG4NET
AND WILL BE AVAILABLE IN THE NEXT RELEASE.

THE NEXT VERSION OF LOG4NET WILL ALSO MAKE IT EASIER TO
CAPTURE CONFIGURATION ERRORS. THE SYNTAX HASN'T BEEN
FINALIZED BUT WILL MOST LIKELY LOOK VERY SIMILAR TO THIS:

 ICOLLECTION CONFIGURATIONMESSAGES =
XMLCONFIGURATOR.CONFIGURE();
 FOR (INT I=0;I<CONFIGURATIONMESSAGES.COUNT;I++)
 {
  RESPONSE.WRITE(CONFIGURATIONMESSAGES[I].TOSTRING() +
"<BR />");
 }

WE HAVE A NUMBER OF OPEN ISSUES BEFORE THE NEXT VERSION IS
RELEASED. I LOOK FORWARD TO YOUR CONTRIBUTIONS IN GETTING
THOSE ISSUES RESOLVED. YOUR HELP IS APPRECIATED!

> GETTING ASONETAPPENDER TO WORK
> ------------------------------
>
>                 KEY: LOG4NET-152
>                 URL:
HTTPS://ISSUES.APACHE.ORG/JIRA/BROWSE/LOG4NET-152
>             PROJECT: LOG4NET
>          ISSUE TYPE: IMPROVEMENT
>    AFFECTS VERSIONS: 1.2.10
>         ENVIRONMENT: WINDOWS ASP.NET C#
>            REPORTER: M
>
> I'VE BEEN TRYING TO GET LOG4NET TO WORK WITH ASP.NET
2.0 AND A DATABASE TABLE. HERE IS THE CONFIG FILE:
> <CONFIGSECTIONS>
> <SECTION NAME="LOG4NET"
TYPE="LOG4NET.CONFIG.LOG4NETCONFIGURATIONSECTIONHANDLER
, LOG4NET" />
> </CONFIGSECTIONS>
> <LOG4NET>
> <APPENDER NAME="ADONETAPPENDER"
TYPE="LOG4NET.APPENDER.ADONETAPPENDER">
> <BUFFERSIZE VALUE="1" />
> <CONNECTIONTYPE
VALUE="SYSTEM.DATA.SQLCLIENT.SQLCONNECTION,
SYSTEM.DATA, VERSION=1.2.10.0, CULTURE=NEUTRAL,
PUBLICKEYTOKEN=B77A5C561934E089" />
> <CONNECTIONSTRING
VALUE="SERVER=CJISDEVSQL01;DATABASE=EVENTLOG;INTEGRATED
SECURITY=TRUE;" />
> <COMMANDTEXT VALUE="EXEC LD80EVENT_CREATE EVENTDATE, LOGLEVEL, MESSAGE, EXCEPTION, UPDATEUSERNAME" />
> <PARAMETER>
> <PARAMETERNAME VALUE="EVENTDATE" />
> <DBTYPE VALUE="DATETIME" />
> <LAYOUT
TYPE="LOG4NET.LAYOUT.RAWTIMESTAMPLAYOUT" />
> </PARAMETER>
> <PARAMETER>
> <PARAMETERNAME VALUE="LOGLEVEL" />
> <DBTYPE VALUE="STRING" />
> <SIZE VALUE="512" />
> <LAYOUT
TYPE="LOG4NET.LAYOUT.PATTERNLAYOUT">
> <CONVERSIONPATTERN VALUE="%P" />
> </LAYOUT>
> </PARAMETER>
> <PARAMETER>
> <PARAMETERNAME VALUE="MESSAGE" />
> <DBTYPE VALUE="STRING" />
> <SIZE VALUE="4000" />
> <LAYOUT
TYPE="LOG4NET.LAYOUT.PATTERNLAYOUT">
> <CONVERSIONPATTERN VALUE="%M" />
> </LAYOUT>
> </PARAMETER>
> <PARAMETER>
> <PARAMETERNAME VALUE="EXCEPTION" />
> <DBTYPE VALUE="STRING" />
> <SIZE VALUE="4000" />
> <LAYOUT
TYPE="LOG4NET.LAYOUT.EXCEPTIONLAYOUT" />
> </PARAMETER>
> <PARAMETER>
> <PARAMETERNAME VALUE="UPDATEUSERNAME" />
> <DBTYPE VALUE="STRING" />
> <SIZE VALUE="50" />
> <LAYOUT
TYPE="LOG4NET.LAYOUT.PATTERNLAYOUT">
> <CONVERSIONPATTERN VALUE="%P" />
> </LAYOUT>
> </PARAMETER>
> </APPENDER>
> <LOGGER NAME="EVENTLOG">
> <LEVEL VALUE="ALL" />
> <APPENDER-REF REF="ADONETAPPENDER" />
> </LOGGER>
> <ROOT>
> <LEVEL VALUE="ALL" />
> <APPENDER-REF REF="ADONETAPPENDER" />
> </ROOT>
> </LOG4NET>
> THIS IS THE LINE OF CODE IN GLOBAL.ASAX,
APPLICATION_START METHOD:
> LOG4NET.CONFIG.XMLCONFIGURATOR.CONFIGURE();
> THIS IS IN THE DEFAULT PAGE:
> PRIVATE STATIC READONLY ILOG EVENTLOG =
LOGMANAGER.GETLOGGER(SYSTEM.REFLECTION.METHODBASE.GETCURRENT
METHOD().DECLARINGTYPE);
> THE ISSUE IS ALL THE PROPERTIES ARE 'ALWAYS' SET TO
FALSE WHEN THE APPLICATION IS RUNNING AND 'NOTHING' IS EVER
WRITTEN TO THE DATABASE. I HAVE BEEN SEARCHING THE WEB FOR A
WEEK NOW AND I CAN NOT FIND ANY INFORMATION THAT HAS MADE A
DIFFERENCE.
> CAN YOU HELP WITH THIS PROBLEM?
> THANK YOU. 

-- 
THIS MESSAGE IS AUTOMATICALLY GENERATED BY JIRA.
-
YOU CAN REPLY TO THIS EMAIL TO ADD A COMMENT TO THE ISSUE
ONLINE.


[1-6]

about | contact  Other archives ( Real Estate discussion Medical topics )