Web service logging issue

Tech-Archive recommends: Fix windows errors by optimizing your registry



Hi,

I use enterprise library 3.0 logging block in a web service project. I used
configuration tool to config web.config file(added logging section) for my
web service. I deployed it as web site on windows 2003. When I test it, the
logging seems not working. I guess I missed something, could anyone help me
out?
Here is the logging section in the web.config file:
<configSections>
<section name="loggingConfiguration"
type="Microsoft.Practices.EnterpriseLibrary.Logging.Configuration.LoggingSettings,
Microsoft.Practices.EnterpriseLibrary.Logging, Version=3.1.0.0,
Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<section name="dataConfiguration"
type="Microsoft.Practices.EnterpriseLibrary.Data.Configuration.DatabaseSettings,
Microsoft.Practices.EnterpriseLibrary.Data, Version=3.1.0.0, Culture=neutral,
PublicKeyToken=b03f5f7f11d50a3a" />
</configSections>
<loggingConfiguration name="Logging Application Block" tracingEnabled="true"
defaultCategory="General" logWarningsWhenNoCategoriesMatch="false">
<listeners>
<add source="FIS Web Service" formatter="Text Formatter"
log="Application" machineName=""
listenerDataType="Microsoft.Practices.EnterpriseLibrary.Logging.Configuration.FormattedEventLogTraceListenerData,
Microsoft.Practices.EnterpriseLibrary.Logging, Version=3.1.0.0,
Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
traceOutputOptions="None"
type="Microsoft.Practices.EnterpriseLibrary.Logging.TraceListeners.FormattedEventLogTraceListener,
Microsoft.Practices.EnterpriseLibrary.Logging, Version=3.1.0.0,
Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
name="Formatted EventLog TraceListener" />
</listeners>
<formatters>
<add template="Timestamp: {timestamp}
Message: {message}
Category:
{category}
Priority: {priority}
EventId: {eventid}
Severity:
{severity}
Title:{title}
Machine: {machine}
Application Domain:
{appDomain}
Process Id: {processId}
Process Name: {processName}
Win32 Thread
Id: {win32ThreadId}
Thread Name: {threadName}
Extended Properties:
{dictionary({key} - {value}
)}"

type="Microsoft.Practices.EnterpriseLibrary.Logging.Formatters.TextFormatter,
Microsoft.Practices.EnterpriseLibrary.Logging, Version=3.1.0.0,
Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
name="Text Formatter" />
</formatters>
<logFilters>
<add minimumPriority="1" maximumPriority="2147483647"
type="Microsoft.Practices.EnterpriseLibrary.Logging.Filters.PriorityFilter,
Microsoft.Practices.EnterpriseLibrary.Logging, Version=3.1.0.0,
Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
name="Priority Filter" />
</logFilters>
<categorySources>
<add switchValue="All" name="General">
<listeners>
<add name="Formatted EventLog TraceListener" />
</listeners>
</add>
<add switchValue="All" name="WebService">
<listeners>
<add name="Formatted EventLog TraceListener" />
</listeners>
</add>
</categorySources>
<specialSources>
<allEvents switchValue="All" name="All Events">
<listeners>
<add name="Formatted EventLog TraceListener" />
</listeners>
</allEvents>
<notProcessed switchValue="All" name="Unprocessed Category" />
<errors switchValue="All" name="Logging Errors & Warnings">
<listeners>
<add name="Formatted EventLog TraceListener" />
</listeners>
</errors>
</specialSources>
</loggingConfiguration>

Besides, I put logging code in an utility assembly where I call enterprise
library, and I reference this assembly (strong named, it's been tested) from
my web service.

Thanks in advance.

william
.



Relevant Pages

  • RE: Enterprise Library 2.0 configuration error
    ... Was the Enterprise Library 2.0 assemblies copied to the output directory? ... created the app.config file with the 'Enterprise Libray Configuration' ... The configuration section for Logging ...
    (microsoft.public.dotnet.framework)
  • Re: Web service logging issue
    ... I use enterprise library 3.0 logging block in a web service project. ... configuration tool to config web.config filefor my ...
    (microsoft.public.dotnet.framework.aspnet.webservices)
  • Enterprise Library 2.0 configuration error
    ... created the app.config file with the 'Enterprise Libray Configuration' ... When I execute the solution within Visual Studio 2005, ... The configuration section for Logging ...
    (microsoft.public.dotnet.framework)
  • Re: A new way to configure Python logging
    ... post about your usage of logging. ... I usually register a logger 'foo' within the application and one logger ... you need to do programmatic configuration anyway. ... so that it is easy to just add multiple handlers for various levels to ...
    (comp.lang.python)
  • Re: permissions on /etc/namedb
    ... Query logging has its own log category, so you would do something like this: ... the fact that queries are recorded in named.run when you bump the debug level is a side effect of the fact that queries are logged to the resolver category at debug level 1.) ... The problem is that the default_debug channel has a special property that cannot be reproduced with configuration options, and you cannot redefine the default logging channels. ... logging (with rndc) -- where would these files go by default? ...
    (freebsd-net)