logging-log4net-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Graham Walsh <graham.walsh-prestata...@calyon.com>
Subject RE: Winforms
Date Fri, 20 Jun 2008 10:21:40 GMT
Hi again,

 

That utility works a treat. Thanks a million Rob and Stephanie! 

 

I have just two minor points (cosmetic).

 

1)       I have my log output in the rich text box (whose background
colour is grey). My log output appears but its not in colour. I know its
not essential, but it adds to user satisfaction to see errors in red.
Any ideas why this is this case? Am I badly configured? 

 

This is what my configuration section looks like;

 

 

 

  <appender name="MainFormRichTextAppender"
type="log4net.Appender.RichTextBoxAppender">

    <file value="logs/RichTextAppenderRocks.log" />

    <appendToFile value="true" />

    <maximumFileSize value="25000KB" />

    <maxSizeRollBackups value="2" />

    <layout type="log4net.Layout.PatternLayout">

      <conversionPattern value="%date [%-2thread] %-5level %-70logger -
%message%newline" />

    </layout>

    <code lang="XML" escaped="true">

      <mapping>

        <level value="DEBUG" />

        <textColorName value="DarkGreen" />

 

      </mapping>

      <mapping>

        <level value="INFO" />

        <textColorName value="ControlText" />

 

      </mapping>

      <mapping>

        <level value="WARN" />

        <textColorName value="Blue" />

 

      </mapping>

      <mapping>

        <level value="ERROR" />

        <textColorName value="Red" />

        <bold value="true" />

        <pointSize value="10" />

 

      </mapping>

      <mapping>

        <level value="FATAL" />

        <textColorName value="Black" />

        <backColorName value="Red" />

        <bold value="true" />

        <pointSize value="12" />

        <fontFamilyName value="Lucida Console" />

 

      </mapping>

    </code>

    </appender>

 

 

 

Thanks a million. This stuff rocks

 

G

 

________________________________

From: WALSH, Graham (CALYON) 
Sent: Wednesday, June 18, 2008 6:45 PM
To: 'Log4NET User'
Subject: RE: Winforms

 

Thanks dude, I think I got it...

 

 

Stephanie Giovannini <giovannini-s....@swbell.net> 

Subject Rich text box appender 

Date Thu, 24 Apr 2008 16:12:24 GMT

 

 

 

That'll be my reading on my way home the lousy sweaty French metro
system :-) 

 

G

 

________________________________

From: Rob Prouse [mailto:Rob.Prouse@Ivara.com] 
Sent: Wednesday, June 18, 2008 5:51 PM
To: Log4NET User
Subject: RE: Winforms

 

Graham,

 

If you check back in the archives for this list about a month, someone
posted an appender that writes to a RichTextBox. I used it and it works
well. It allows you to colourize your output which is nice for the
different log levels.

 

If you can't find it, let me know and I will repost.

 

Rob Prouse

 

From: Graham Walsh [mailto:graham.walsh-prestataire@calyon.com] 
Sent: June-18-08 4:15 AM
To: Log4NET User
Subject: Winforms

 

Hi,

 

Could anybody tell me where is the best starting point to integrate
log4net into a winforms application ?  I intend to have a UPD appender
configured and have my log information displayed in a textbox. Is a
textbox the best control to go with? How do I attach my log output to
the control I ultimately decide upon?

 

 

Thanks for any info/replies. Have a nice day

 

Graham

 


Mime
  • Unnamed multipart/mixed (inline, None, 0 bytes)
View raw message