Ok Jon, I'll rise to the challenge though I suspect that I am way over my head trying 
to hack the code you aces have put together...

Background:  I needed to see a completely up to date log because the JVM was crashing 
(still is the piece of S**T).
Modificaton to JServ:   I modified JServ to allow setting the logger thread priority 
dynamically from the jserv.properties file using something like:

# Log Daemon thread priority
# Only for debugging needs.
# Other than default (MIN_PRIORITY)
# will result in poor servlet performance
# (but will spit out log messages more responsively
# which can be helpful in certain debugging situations)
# Default:  log.logdaemon.priority=MIN_PRIORITY
# possible values:  NORM_PRIORITY, MAX_PRIORITY
log.logdaemon.priority=MAX_PRIORITY


(I guess that this with the last line commented out should be added to the 
jserv.properties file if you want to actually use this code (yikes!)).

Here are the diffs (not sure I did this correctly, I'm really NOT a unix programmer... 
though that seems to be changing slowly, painfully :-))  Note that these are on the 
1.1 actual release since I haven't found time to learn how to use CVS yet.


diff -r ApacheJServ-1.1/src/java/org/apache/java/io/LogWriter.java 
ApacheJServ-1.1.real/src/java/org/apache/java/io/LogWriter.java
110,111d109
<    
<     public static final String KEYWORD_LOGGER_THREAD_PRIORITY = 
"logdaemon.priority";    // tbm -- added
319,335d316
<
<           // tbm -- added Logging Thread priority setting
<           String agentpriority = configurations.getString( identifier + "." + 
KEYWORD_LOGGER_THREAD_PRIORITY, "MIN_PRIORITY" );
<         
<           if ( agentpriority.equals( "MIN_PRIORITY" ) )
<               this.logDaemon.setPriority( Thread.MIN_PRIORITY );
<            if ( agentpriority.equals( "NORM_PRIORITY" ) )
<                this.logDaemon.setPriority( Thread.NORM_PRIORITY );
<            else if ( agentpriority.equals( "MAX_PRIORITY" ) )
<                this.logDaemon.setPriority( Thread.MAX_PRIORITY );
<            else
<                {
<                    this.logDaemon.setPriority( Thread.MIN_PRIORITY );
<                    // tell user their setting didn't make sense? 
<                    // Have to do so AFTER the log Agent is started, no?
<                }
<            // tbm -- end additions (addition in top section, 
KEYWORD_LOGGER_THREAD_PRIORITY, and in Agent commented out setting priority
446c427
<           //     Thread.currentThread().setPriority(Thread.MIN_PRIORITY);   // tbm 
commented out
---
>             Thread.currentThread().setPriority(Thread.MIN_PRIORITY);


Given my real lack of experience coding for Unix and Apache etc., someone who actually 
knows something should REALLY look at this code to make sure I don't break something 
everyone uses :-(

peace,
Tyler


>Now, if only we could get a small percentage of those people to actually
>jump in and contribute source code, documentation, etc. ;-)
>
>-jon

------------------------------------------------------
Tyler Morrison - [EMAIL PROTECTED]


--
----------------------------------------------------------
To subscribe:        [EMAIL PROTECTED]
To unsubscribe:      [EMAIL PROTECTED]
Archives and Other:  <http://java.apache.org/main/mail.html>
Problems?:           [EMAIL PROTECTED]

Reply via email to