logging-log4net-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sam Carleton" <scarle...@miltonstreet.com>
Subject OutputDebugStringAppender w/ VS2005
Date Fri, 09 Jun 2006 18:30:43 GMT
I am writing a windows EXE application and trying to use the
OutputDebugStringAppender to get a dump in the output window of VS2005
with no luck.  Here is the app.config:


    <!-- Define some output appenders -->
    <appender name="RollingLogFileAppender"
      <file value="TOCEngine.Rolling.txt" />
      <appendToFile value="true" />
      <maxSizeRollBackups value="10" />
      <maximumFileSize value="1MB" />
      <rollingStyle value="Once" />
      <staticLogFileName value="true" />
      <layout type="log4net.Layout.PatternLayout">
        <header value="[Header]&#13;&#10;" />
        <footer value="[Footer]&#13;&#10;" />
        <conversionPattern value="%date [%thread] %-5level %logger
[%ndc] - %message%newline" />

    <appender name="ConsoleAppender" type="log4net.Appender.ConsoleAppender">
      <layout type="log4net.Layout.PatternLayout">
        <conversionPattern value="%date %message%newline" />

    <appender name="DebugConsoleOutput"
      <layout type="log4net.Layout.PatternLayout">
        <conversionPattern value="%date %message%newline" />

    <!-- Setup the root category, add the appenders and set the
default level -->
      <level value="DEBUG" />
      <appender-ref ref="DebugConsoleOutput" />
      <appender-ref ref="RollingLogFileAppender" />

    <!-- Specify the level for some specific categories -->
    <logger name="Nano.TOCEngine.Program">
      <level value="ALL" />
      <appender-ref ref="ConsoleAppender" />

Any thoughts on how I get it to log to the VS2005 window?


View raw message