I also had problems with the logging.

I found that if I want to use the standard Glassfish server.log  
instead of a separate log file then I have to do the following:

1. In the administrator Glassfish web console on the page Application  
Server > Logging > Log Levels. Add an additional parameter  
net.sourceforge.stripes = FINE.
2. Don't bundle the log4j.jar with your war and it will use the  
standard java logging.

This has the added advantage that if you are in Netbeans the Stripes  
logs will appear in the Glassfish log window.

Phil
-----
http://www.shiftyjelly.com/index.php/Stripes

On 18/06/2008, at 2:45 AM, marijan milicevic wrote:

Hi Ken,
> to another page via a submit button it just goes to default(I guess  
> default
> because glassfish logging mech sucks) and I keep coming up with the  
> same page.
>
>

if you have problems with logging, just drop your log4j.xml into
domain1/classes directory,
and log to a file which you can tail...at least if on *nix..

You also may need to place log4j.jar into domain1/lib/ext directory...

sample log4j(change patterns to your needs, file gets generated within
/glassfish/domains/domain1/domain/web.log):


<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">

<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/";>
    <appender name="FILE" class="org.apache.log4j.RollingFileAppender">
        <param name="Threshold" value="DEBUG"/>
        <param name="File" value="web.log"/>
        <param name="Append" value="true"/>
        <param name="MaxFileSize" value="5000KB"/>
        <param name="MaxBackupIndex" value="1"/>
        <layout class="org.apache.log4j.PatternLayout">
            <param name="ConversionPattern" value="%-5p - [%-120m] - at
%c.%M(%F:%L)%n"/>
        </layout>
    </appender>
    <logger name="net.sf.ehcache">
        <level value="debug"/>
        <appender-ref ref="FILE"/>
    </logger>
    <logger name="net.sourceforge.stripes">
        <level value="debug"/>
        <appender-ref ref="FILE"/>
    </logger>
    <logger name="org.hibernate">
        <level value="WARN"/>
        <appender-ref ref="FILE"/>
        <appender-ref ref="CONSOLE"/>
    </logger>

    <logger name="org.apache">
        <level value="error"/>
        <appender-ref ref="FILE"/>
    </logger>
</log4j:configuration>



hth
-m

-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
Stripes-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/stripes-users


-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
Stripes-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/stripes-users

Reply via email to