You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4net-user@logging.apache.org by Graham Walsh <gr...@calyon.com> on 2008/07/01 09:13:13 UTC

RE: rich text box and scroll

thanks James,
 
I'll code that up. Helped a lot :)
 
 
G

________________________________

From: James Katz [mailto:jkatz@helicosbio.com] 
Sent: Tuesday, June 24, 2008 3:11 PM
To: Log4NET User
Subject: RE: rich text box and scroll


You will want to make the text of the RTB follow the tail of the log.
In-core storage of text is VERY co$tly. If you're using a C# or Java
RTB, you assign its Text property the whole string you want.  You
generally can't just add the newest line to the existing text.  Also the
+= implementation for strings in those 2 languages are wicked expensive.
 
So given that you will have to pause and recalculate the contents of the
text box when some number 'n' of new lines comes in, you will have to
store the total lines somewhere else anyway.  but that's a side issue.
 
 you ought to have the RTB enabled, but explicitly trap the MouseDown
event in the box.  When you do that, you can start the selection process
(handling the mousemove and mouse up events).  Since most window
controls are single threaded, that in and of itself will stop the
process of appending text to the window, until you've finished
processing the mouseup event.
 
Since you're capturing a mousedown event, you control all the
interaction - all you have to do is disregard key events to keep people
from typing into the text - the only allowable action is to mousemove
until mouseup.  That way, you can keep the RTB enabled.
 
HTH,
 
Jim
 
 

________________________________

From: Graham Walsh [mailto:graham.walsh-prestataire@calyon.com] 
Sent: Tuesday, June 24, 2008 3:13 AM
To: Log4NET User
Subject: rich text box and scroll



Hi Hi,

 

Whats the simplest way to make the content of the rich text box
"selectable". We have an awful lot of log output going to that window,
all of which is needed. Ideally I'd like to freeze the window, select
the text and have the RTPappender continue its writing. By default I'd
temporarily set the RTB enabled == false, select the text and then set
it back to true but that seems a bit luggish.

 

Any tips?

 

Thanks

 

Graham

 


EventLog Appender on Win2k3 with ASP.net

Posted by "Pattenaude, Jerry" <Je...@RedPrairie.com>.
I haven't seen this addressed, so here's my problem and solution for
anyone that may be interested.

 

I developed an app on XP and all my logs would make it into the EventLog
without any issues.  I was using a new Eventlog "mylog" and the
application name is "myapp".  I knew that I had to create the log and
source because asp.net didn't have rights to create the new log.

 

System.Diagnostics.EventLog.CreateEventSource("myapp", "mylog");

 

This worked and everything was good.  Then I went to Win2k3 where
registry security has been locked down, and my log messages no longer
showed up.  After a day of searching I finally found
http://www.jameskovacs.com/blog/CommentView.aspx?guid=cd6e5f6e-7107-48bc
-8563-f5669706fcdc which had the solution to my problem.  I needed to go
to the registry and modify the CustomSD value under
HKLM\SYSTEM\CurrentControlSet\Services\EventLog\mylog\ I had to add
(A;;0x3;;;AU) to the end since I was using a non default user to run my
asp.net app.  Now my log messages are showing up under Win3k2.

 

Hope this helps... maybe it could be added to the FAQ?

 

Jerry



This e-mail is confidential and is intended solely for the use of the addressee(s). Opinions expressed are solely those of the author and may not be those of RedPrairie. Content is not to be relied upon by any person other than the addressee(s), without prior written approval of RedPrairie. If you are not the intended recipient, please notify us immediately, destroy any copies and delete from your computer systems.
If you have received this e-mail in error, any use, disclosure, dissemination, forwarding, printing or copying is strictly prohibited.
Although this email and any attachments are believed to be free of any virus or other defects which might affect any computer or IT system into which they are received, no responsibility is accepted by RedPrairie for any loss or damage arising in any way from the receipt or use therein.