WCF - Microsoft Enterprise Loggig 5.0 [英] WCF - Microsoft Enterprise Loggig 5.0

查看:90
本文介绍了WCF - Microsoft Enterprise Loggig 5.0的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述





我在DMZ服务器上托管了一个wcf服务。

我使用Microsoft Enterprise Library 5.0进行日志记录,我已经设置了日志文件定期增加,并在它达到最大尺寸设置时创建一个新的日志文件。



下面是代码web.config。



Hi,

I have a wcf services hosted in the DMZ server.
I am using Microsoft Enterprise Library 5.0 for logging, in which i have set the log files to increment periodically and also to create a new log file as and when it reaches its max size set.

Below is the code of web.config.

 <configSections>
    <section name="loggingConfiguration" type="Microsoft.Practices.EnterpriseLibrary.Logging.Configuration.LoggingSettings, Microsoft.Practices.EnterpriseLibrary.Logging, Version=5.0.414.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" requirePermission="true" />
  </configSections>

<loggingConfiguration name="" tracingEnabled="true" defaultCategory="General">    <listeners>      <add name="LogTest" type="Microsoft.Practices.EnterpriseLibrary.Logging.TraceListeners.RollingFlatFileTraceListener, Microsoft.Practices.EnterpriseLibrary.Logging, Version=5.0.414.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
        listenerDataType="Microsoft.Practices.EnterpriseLibrary.Logging.Configuration.RollingFlatFileTraceListenerData, Microsoft.Practices.EnterpriseLibrary.Logging, Version=5.0.414.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
        fileName="D:\Ram\Dotnet Projects\Logging\LogTest\Logs\log.log"
        formatter="Text Formatter" rollFileExistsBehavior="Increment"
        rollInterval="Day" rollSizeKB="10" traceOutputOptions="LogicalOperationStack, DateTime, Timestamp, ProcessId, ThreadId, Callstack" />
    </listeners>
    <formatters>
      <add type="Microsoft.Practices.EnterpriseLibrary.Logging.Formatters.TextFormatter, Microsoft.Practices.EnterpriseLibrary.Logging, Version=5.0.414.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
        template="Timestamp: {timestamp}{newline}&#xA;Message: {message}{newline}&#xA;Category: {category}{newline}&#xA;Priority: {priority}{{priority}}&#xA;EventId: {eventid}{newline}&#xA;Severity: {severity}{newline}&#xA;Title:{title}{newline}&#xA;Machine: {localMachine}{newline}&#xA;App Domain: {localAppDomain}{newline}&#xA;ProcessId: {localProcessId}{newline}&#xA;Process Name: {localProcessName}{newline}&#xA;Thread Name: {threadName}{newline}&#xA;Win32 ThreadId:{win32ThreadId}{newline}&#xA;Extended Properties: {dictionary({key} - {value}{newline})}"
        name="Text Formatter" />
    </formatters>
    <categorySources>
      <add switchValue="All" name="General">
        <listeners>
          <add name="LogTest" />
        </listeners>
      </add>
    </categorySources>
    <specialSources>
      <allEvents switchValue="All" name="All Events">
        <listeners>
          <add name="LogTest" />
        </listeners>
      </allEvents>
      <notProcessed switchValue="All" name="Unprocessed Category">
        <listeners>
          <add name="LogTest" />
        </listeners>
      </notProcessed>
      <errors switchValue="All" name="Logging Errors &amp; Warnings">
        <listeners>
          <add name="LogTest" />
        </listeners>
      </errors>
    </specialSources>
  </loggingConfiguration>



问题:



在我的本地计算机上,记录新文件正在达到最大尺寸时创建。但它不会发生在DMZ(生产)服务器中。



我需要在Web.config文件中设置什么?

我需要在IIS中设置什么吗?它托管在Windows 2003服务器上。





提前致谢。


Questions:

In my local computer, the log new files are getting created as and when it reaches the max size. But it is not happening in the DMZ (production) server.

Is there anything that i need to set in Web.config file ?
Is there anything that i need to set in IIS? It is hosted in windows 2003 server.


Thanks in advance.

推荐答案

这篇关于WCF - Microsoft Enterprise Loggig 5.0的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆