You are viewing a plain text version of this content. The canonical link for it is here.
Posted to slide-dev@jakarta.apache.org by Thomas Bellembois <th...@univ-rennes1.fr> on 2005/03/09 12:25:57 UTC

QuotaInterceptor

Hello,

I am working on Slide quotas.
I have some problems to start. If you could help me I would appreciate 
very much.
I have made a new class (public class QuotaInterceptor implements 
ContentInterceptor) and I want to log its methods.
I have declared the Slide servlet as the default servlet on my Tomcat (I 
have read in the mailing list that Interceptors does not work if we 
don't do that, I don't know if this bug is fixed).
I have declared an org.apache.slide.util.logger.SimpleLogger in my new 
class.
I have a log4j.xml (and my Domain.xml) configured to log in debug mode 
(and it works with other classes).
But apparently Slide does not used my Interceptor or my Interceptor does 
not log.
I have declared and configured it in my Domain.xml.
I am thinking about a configuration problem (in my Domain.xml) or a 
logging problem but I can not find it.

Any idea ?

Thanks.

Thomas

-- 
BELLEMBOIS Thomas
CRI, Université de Rennes 1
Campus de beaulieu
Avenue du Général Leclerc
35042 RENNES Cedex
Tél.: 02.23.23.69.60
Mail: Thomas.Bellembois@univ-rennes1.fr



---------------------------------------------------------------------
To unsubscribe, e-mail: slide-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: slide-dev-help@jakarta.apache.org


Re: QuotaInterceptor

Posted by Thomas Bellembois <th...@univ-rennes1.fr>.
I will have a look. Thank you.
Thomas

Honoré David wrote:

> Thomas Bellembois wrote:
>
>> Hello,
>>
>> I am working on Slide quotas.
>> I have some problems to start. If you could help me I would 
>> appreciate very much.
>> I have made a new class (public class QuotaInterceptor implements 
>> ContentInterceptor) and I want to log its methods.
>> I have declared the Slide servlet as the default servlet on my Tomcat 
>> (I have read in the mailing list that Interceptors does not work if 
>> we don't do that, I don't know if this bug is fixed).
>> I have declared an org.apache.slide.util.logger.SimpleLogger in my 
>> new class.
>> I have a log4j.xml (and my Domain.xml) configured to log in debug 
>> mode (and it works with other classes).
>> But apparently Slide does not used my Interceptor or my Interceptor 
>> does not log.
>> I have declared and configured it in my Domain.xml.
>> I am thinking about a configuration problem (in my Domain.xml) or a 
>> logging problem but I can not find it.
>>
>> Any idea ?
>>
>> Thanks.
>>
>> Thomas
>>
> Just a question : do you take a look at the slide's events-system. 
> Event are vetoable this will be usefull for quota... i think.
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: slide-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: slide-dev-help@jakarta.apache.org
>


-- 
BELLEMBOIS Thomas
CRI, Université de Rennes 1
Campus de beaulieu
Avenue du Général Leclerc
35042 RENNES Cedex
Tél.: 02.23.23.69.60
Mail: Thomas.Bellembois@univ-rennes1.fr



---------------------------------------------------------------------
To unsubscribe, e-mail: slide-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: slide-dev-help@jakarta.apache.org


Re: QuotaInterceptor

Posted by Honoré David <dh...@oma.be>.
Thomas Bellembois wrote:

> Hello,
>
> I am working on Slide quotas.
> I have some problems to start. If you could help me I would appreciate 
> very much.
> I have made a new class (public class QuotaInterceptor implements 
> ContentInterceptor) and I want to log its methods.
> I have declared the Slide servlet as the default servlet on my Tomcat 
> (I have read in the mailing list that Interceptors does not work if we 
> don't do that, I don't know if this bug is fixed).
> I have declared an org.apache.slide.util.logger.SimpleLogger in my new 
> class.
> I have a log4j.xml (and my Domain.xml) configured to log in debug mode 
> (and it works with other classes).
> But apparently Slide does not used my Interceptor or my Interceptor 
> does not log.
> I have declared and configured it in my Domain.xml.
> I am thinking about a configuration problem (in my Domain.xml) or a 
> logging problem but I can not find it.
>
> Any idea ?
>
> Thanks.
>
> Thomas
>
Just a question : do you take a look at the slide's events-system. Event 
are vetoable this will be usefull for quota... i think.



---------------------------------------------------------------------
To unsubscribe, e-mail: slide-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: slide-dev-help@jakarta.apache.org


Re: QuotaInterceptor

Posted by Thomas Bellembois <th...@univ-rennes1.fr>.
Thank you for your help. My Interceptor is now working. I can see it 
putting breakpoints in my source code.
I will try your log4j.xml file for my logging problem.
Thomas

karl@gan.no wrote:

>This is just a though, but in you log4j file you use the <level> tag to
>set priority, and <category> to define logger. Might be a problem with the
>version of log4j you are using. Im using log4j-1.2.8 and here is my
>log4j.xml file.
>
>Dont know it its any help....
>
>Karl
>
><?xml version="1.0" encoding="ISO-8859-1"?>
><!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
><!-- $Id: log4j.xml,v 1.3.2.1 2005/01/03 09:21:25 karl Exp $ -->
><log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/"
>debug="false">
>	<appender name="CON" class="org.apache.log4j.ConsoleAppender">
>		<param name="Target" value="System.out"/>
>		<layout class="org.apache.log4j.PatternLayout">
>			<param name="ConversionPattern" value="%d{ABSOLUTE} %-5p [%C.%M] %m%n"/>
>		</layout>
>	</appender>
>	<category name="org.apache.slide" additivity="false">
>		<priority value="DEBUG"/>
>		<appender-ref ref="CON"/>
>	</category>
>	<category name="no.apache.lucene" additivity="false">
>		<priority value="DEBUG"/>
>		<appender-ref ref="CON"/>
>	</category>
>	<root>
>		<priority value="WARN"/>
>		<appender-ref ref="CON"/>
>	</root>
></log4j:configuration>
>
>  
>
>>It does not work :-(
>>Probably a problem with my logger.
>>Thank you for your help.
>>
>><namespace name="slide">
>>        <definition>
>>            <store name="tx">
>>             ...
>>            </store>
>>            <scope match="/" store="tx"/>
>>        </definition>
>>        <configuration>
>>            <!-- Actions mapping -->
>>            <read-object>/actions/read</read-object>
>>            ....
>>            <content-interceptor
>>class="org.apache.slide.content.QuotaInterceptor"/>
>>        </configuration>
>>...
>></namespace>
>>
>>
>>
>>Honoré David wrote:
>>
>>    
>>
>>>Thomas Bellembois wrote:
>>>
>>>      
>>>
>>>>Here is a part of my Domain.xml file :
>>>>
>>>><store name="tx">
>>>>...
>>>>   <!-- no param for this interceptor at the moment-->
>>>>   <content-interceptor
>>>>class="org.apache.slide.content.QuotaInterceptor">
>>>>   </content-interceptor>
>>>></store>
>>>>
>>>>        
>>>>
>>>Humm ... no.
>>>
>>>put them in
>>>
>>>   <domain ...>
>>>       <namespace ...>
>>>           <store ...>
>>>           </store>
>>>           <configuration>
>>>               <content-interceptor
>>>class="org.apache.slide.content.QuotaInterceptor"/>
>>>           </configuration>
>>>      ...
>>>      ...
>>>         </namespace>
>>>   </domain>
>>>
>>>      
>>>
>>>>Is it the good place for interceptors configuration?
>>>>
>>>>and my log4j.xml file :
>>>>
>>>><?xml version="1.0" encoding="UTF-8"?>
>>>><!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
>>>><log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/">
>>>>     <appender name="OPIWEB_CONSOLE"
>>>>class="org.apache.log4j.ConsoleAppender">
>>>>       <layout class="org.apache.log4j.PatternLayout">
>>>>           <param name="ConversionPattern" value="%-5p (%C:%L) -
>>>>%m%n"/>
>>>>       </layout>
>>>>   </appender>
>>>>
>>>>    <logger name="org.apache.slide.content">
>>>>       <level value="DEBUG"/>
>>>>       <appender-ref ref="OPIWEB_CONSOLE"/>
>>>>   </logger>
>>>></log4j:configuration>
>>>>
>>>>I have tried with <logger name="org.apache.slide"> and classes of
>>>>this package are logged.
>>>>
>>>>Another question :
>>>>Would it be better to use events and not interceptors for quotas ?
>>>>
>>>>Thanks.
>>>>
>>>>Thomas
>>>>
>>>>
>>>>karl@gan.no wrote:
>>>>
>>>>        
>>>>
>>>>>Please supply the Domain.xml and log4j.xml files, it would help us
>>>>>helping
>>>>>you :-)
>>>>>
>>>>>Mvh Karl
>>>>>
>>>>>
>>>>>
>>>>>          
>>>>>
>>>>>>Hello,
>>>>>>
>>>>>>I am working on Slide quotas.
>>>>>>I have some problems to start. If you could help me I would
>>>>>>appreciate
>>>>>>very much.
>>>>>>I have made a new class (public class QuotaInterceptor implements
>>>>>>ContentInterceptor) and I want to log its methods.
>>>>>>I have declared the Slide servlet as the default servlet on my
>>>>>>Tomcat (I
>>>>>>have read in the mailing list that Interceptors does not work if we
>>>>>>don't do that, I don't know if this bug is fixed).
>>>>>>I have declared an org.apache.slide.util.logger.SimpleLogger in my
>>>>>>new
>>>>>>class.
>>>>>>I have a log4j.xml (and my Domain.xml) configured to log in debug
>>>>>>mode
>>>>>>(and it works with other classes).
>>>>>>But apparently Slide does not used my Interceptor or my Interceptor
>>>>>>does
>>>>>>not log.
>>>>>>I have declared and configured it in my Domain.xml.
>>>>>>I am thinking about a configuration problem (in my Domain.xml) or a
>>>>>>logging problem but I can not find it.
>>>>>>
>>>>>>Any idea ?
>>>>>>
>>>>>>Thanks.
>>>>>>
>>>>>>Thomas
>>>>>>
>>>>>>--
>>>>>>BELLEMBOIS Thomas
>>>>>>CRI, Université de Rennes 1
>>>>>>Campus de beaulieu
>>>>>>Avenue du Général Leclerc
>>>>>>35042 RENNES Cedex
>>>>>>Tél.: 02.23.23.69.60
>>>>>>Mail: Thomas.Bellembois@univ-rennes1.fr
>>>>>>
>>>>>>
>>>>>>
>>>>>>---------------------------------------------------------------------
>>>>>>To unsubscribe, e-mail: slide-dev-unsubscribe@jakarta.apache.org
>>>>>>For additional commands, e-mail: slide-dev-help@jakarta.apache.org
>>>>>>
>>>>>>
>>>>>>
>>>>>>            
>>>>>>
>>>>>
>>>>>
>>>>>---------------------------------------------------------------------
>>>>>To unsubscribe, e-mail: slide-dev-unsubscribe@jakarta.apache.org
>>>>>For additional commands, e-mail: slide-dev-help@jakarta.apache.org
>>>>>
>>>>>
>>>>>
>>>>>          
>>>>>
>>>>        
>>>>
>>>
>>>
>>>---------------------------------------------------------------------
>>>To unsubscribe, e-mail: slide-dev-unsubscribe@jakarta.apache.org
>>>For additional commands, e-mail: slide-dev-help@jakarta.apache.org
>>>
>>>      
>>>
>>--
>>BELLEMBOIS Thomas
>>CRI, Université de Rennes 1
>>Campus de beaulieu
>>Avenue du Général Leclerc
>>35042 RENNES Cedex
>>Tél.: 02.23.23.69.60
>>Mail: Thomas.Bellembois@univ-rennes1.fr
>>
>>
>>
>>---------------------------------------------------------------------
>>To unsubscribe, e-mail: slide-dev-unsubscribe@jakarta.apache.org
>>For additional commands, e-mail: slide-dev-help@jakarta.apache.org
>>
>>
>>    
>>
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: slide-dev-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: slide-dev-help@jakarta.apache.org
>
>  
>


-- 
BELLEMBOIS Thomas
CRI, Université de Rennes 1
Campus de beaulieu
Avenue du Général Leclerc
35042 RENNES Cedex
Tél.: 02.23.23.69.60
Mail: Thomas.Bellembois@univ-rennes1.fr



---------------------------------------------------------------------
To unsubscribe, e-mail: slide-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: slide-dev-help@jakarta.apache.org


Re: QuotaInterceptor

Posted by ka...@gan.no.
This is just a though, but in you log4j file you use the <level> tag to
set priority, and <category> to define logger. Might be a problem with the
version of log4j you are using. Im using log4j-1.2.8 and here is my
log4j.xml file.

Dont know it its any help....

Karl

<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
<!-- $Id: log4j.xml,v 1.3.2.1 2005/01/03 09:21:25 karl Exp $ -->
<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/"
debug="false">
	<appender name="CON" class="org.apache.log4j.ConsoleAppender">
		<param name="Target" value="System.out"/>
		<layout class="org.apache.log4j.PatternLayout">
			<param name="ConversionPattern" value="%d{ABSOLUTE} %-5p [%C.%M] %m%n"/>
		</layout>
	</appender>
	<category name="org.apache.slide" additivity="false">
		<priority value="DEBUG"/>
		<appender-ref ref="CON"/>
	</category>
	<category name="no.apache.lucene" additivity="false">
		<priority value="DEBUG"/>
		<appender-ref ref="CON"/>
	</category>
	<root>
		<priority value="WARN"/>
		<appender-ref ref="CON"/>
	</root>
</log4j:configuration>

> It does not work :-(
> Probably a problem with my logger.
> Thank you for your help.
>
> <namespace name="slide">
>         <definition>
>             <store name="tx">
>              ...
>             </store>
>             <scope match="/" store="tx"/>
>         </definition>
>         <configuration>
>             <!-- Actions mapping -->
>             <read-object>/actions/read</read-object>
>             ....
>             <content-interceptor
> class="org.apache.slide.content.QuotaInterceptor"/>
>         </configuration>
> ...
> </namespace>
>
>
>
> Honoré David wrote:
>
>> Thomas Bellembois wrote:
>>
>>> Here is a part of my Domain.xml file :
>>>
>>> <store name="tx">
>>> ...
>>>    <!-- no param for this interceptor at the moment-->
>>>    <content-interceptor
>>> class="org.apache.slide.content.QuotaInterceptor">
>>>    </content-interceptor>
>>> </store>
>>>
>> Humm ... no.
>>
>> put them in
>>
>>    <domain ...>
>>        <namespace ...>
>>            <store ...>
>>            </store>
>>            <configuration>
>>                <content-interceptor
>> class="org.apache.slide.content.QuotaInterceptor"/>
>>            </configuration>
>>       ...
>>       ...
>>          </namespace>
>>    </domain>
>>
>>> Is it the good place for interceptors configuration?
>>>
>>> and my log4j.xml file :
>>>
>>> <?xml version="1.0" encoding="UTF-8"?>
>>> <!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
>>> <log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/">
>>>      <appender name="OPIWEB_CONSOLE"
>>> class="org.apache.log4j.ConsoleAppender">
>>>        <layout class="org.apache.log4j.PatternLayout">
>>>            <param name="ConversionPattern" value="%-5p (%C:%L) -
>>> %m%n"/>
>>>        </layout>
>>>    </appender>
>>>
>>>     <logger name="org.apache.slide.content">
>>>        <level value="DEBUG"/>
>>>        <appender-ref ref="OPIWEB_CONSOLE"/>
>>>    </logger>
>>> </log4j:configuration>
>>>
>>> I have tried with <logger name="org.apache.slide"> and classes of
>>> this package are logged.
>>>
>>> Another question :
>>> Would it be better to use events and not interceptors for quotas ?
>>>
>>> Thanks.
>>>
>>> Thomas
>>>
>>>
>>> karl@gan.no wrote:
>>>
>>>> Please supply the Domain.xml and log4j.xml files, it would help us
>>>> helping
>>>> you :-)
>>>>
>>>> Mvh Karl
>>>>
>>>>
>>>>
>>>>> Hello,
>>>>>
>>>>> I am working on Slide quotas.
>>>>> I have some problems to start. If you could help me I would
>>>>> appreciate
>>>>> very much.
>>>>> I have made a new class (public class QuotaInterceptor implements
>>>>> ContentInterceptor) and I want to log its methods.
>>>>> I have declared the Slide servlet as the default servlet on my
>>>>> Tomcat (I
>>>>> have read in the mailing list that Interceptors does not work if we
>>>>> don't do that, I don't know if this bug is fixed).
>>>>> I have declared an org.apache.slide.util.logger.SimpleLogger in my
>>>>> new
>>>>> class.
>>>>> I have a log4j.xml (and my Domain.xml) configured to log in debug
>>>>> mode
>>>>> (and it works with other classes).
>>>>> But apparently Slide does not used my Interceptor or my Interceptor
>>>>> does
>>>>> not log.
>>>>> I have declared and configured it in my Domain.xml.
>>>>> I am thinking about a configuration problem (in my Domain.xml) or a
>>>>> logging problem but I can not find it.
>>>>>
>>>>> Any idea ?
>>>>>
>>>>> Thanks.
>>>>>
>>>>> Thomas
>>>>>
>>>>> --
>>>>> BELLEMBOIS Thomas
>>>>> CRI, Université de Rennes 1
>>>>> Campus de beaulieu
>>>>> Avenue du Général Leclerc
>>>>> 35042 RENNES Cedex
>>>>> Tél.: 02.23.23.69.60
>>>>> Mail: Thomas.Bellembois@univ-rennes1.fr
>>>>>
>>>>>
>>>>>
>>>>> ---------------------------------------------------------------------
>>>>> To unsubscribe, e-mail: slide-dev-unsubscribe@jakarta.apache.org
>>>>> For additional commands, e-mail: slide-dev-help@jakarta.apache.org
>>>>>
>>>>>
>>>>>
>>>>
>>>>
>>>>
>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: slide-dev-unsubscribe@jakarta.apache.org
>>>> For additional commands, e-mail: slide-dev-help@jakarta.apache.org
>>>>
>>>>
>>>>
>>>
>>>
>>
>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: slide-dev-unsubscribe@jakarta.apache.org
>> For additional commands, e-mail: slide-dev-help@jakarta.apache.org
>>
>
>
> --
> BELLEMBOIS Thomas
> CRI, Université de Rennes 1
> Campus de beaulieu
> Avenue du Général Leclerc
> 35042 RENNES Cedex
> Tél.: 02.23.23.69.60
> Mail: Thomas.Bellembois@univ-rennes1.fr
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: slide-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: slide-dev-help@jakarta.apache.org
>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: slide-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: slide-dev-help@jakarta.apache.org


Re: QuotaInterceptor

Posted by Thomas Bellembois <th...@univ-rennes1.fr>.
It does not work :-(
Probably a problem with my logger.
Thank you for your help.

<namespace name="slide">
        <definition>
            <store name="tx">
             ...
            </store>
            <scope match="/" store="tx"/>
        </definition>
        <configuration>
            <!-- Actions mapping -->
            <read-object>/actions/read</read-object>
            ....
            <content-interceptor 
class="org.apache.slide.content.QuotaInterceptor"/>
        </configuration>
...
</namespace>



Honoré David wrote:

> Thomas Bellembois wrote:
>
>> Here is a part of my Domain.xml file :
>>
>> <store name="tx">
>> ...
>>    <!-- no param for this interceptor at the moment-->
>>    <content-interceptor 
>> class="org.apache.slide.content.QuotaInterceptor">
>>    </content-interceptor>
>> </store>
>>
> Humm ... no.
>
> put them in
>
>    <domain ...>
>        <namespace ...>
>            <store ...>
>            </store>
>            <configuration>
>                <content-interceptor 
> class="org.apache.slide.content.QuotaInterceptor"/>
>            </configuration>
>       ...
>       ...
>          </namespace>
>    </domain>
>
>> Is it the good place for interceptors configuration?
>>
>> and my log4j.xml file :
>>
>> <?xml version="1.0" encoding="UTF-8"?>
>> <!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
>> <log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/">
>>      <appender name="OPIWEB_CONSOLE" 
>> class="org.apache.log4j.ConsoleAppender">
>>        <layout class="org.apache.log4j.PatternLayout">
>>            <param name="ConversionPattern" value="%-5p (%C:%L) - %m%n"/>
>>        </layout>
>>    </appender>
>>
>>     <logger name="org.apache.slide.content">
>>        <level value="DEBUG"/>
>>        <appender-ref ref="OPIWEB_CONSOLE"/>
>>    </logger>
>> </log4j:configuration>
>>
>> I have tried with <logger name="org.apache.slide"> and classes of 
>> this package are logged.
>>
>> Another question :
>> Would it be better to use events and not interceptors for quotas ?
>>
>> Thanks.
>>
>> Thomas
>>
>>
>> karl@gan.no wrote:
>>
>>> Please supply the Domain.xml and log4j.xml files, it would help us 
>>> helping
>>> you :-)
>>>
>>> Mvh Karl
>>>
>>>  
>>>
>>>> Hello,
>>>>
>>>> I am working on Slide quotas.
>>>> I have some problems to start. If you could help me I would appreciate
>>>> very much.
>>>> I have made a new class (public class QuotaInterceptor implements
>>>> ContentInterceptor) and I want to log its methods.
>>>> I have declared the Slide servlet as the default servlet on my 
>>>> Tomcat (I
>>>> have read in the mailing list that Interceptors does not work if we
>>>> don't do that, I don't know if this bug is fixed).
>>>> I have declared an org.apache.slide.util.logger.SimpleLogger in my new
>>>> class.
>>>> I have a log4j.xml (and my Domain.xml) configured to log in debug mode
>>>> (and it works with other classes).
>>>> But apparently Slide does not used my Interceptor or my Interceptor 
>>>> does
>>>> not log.
>>>> I have declared and configured it in my Domain.xml.
>>>> I am thinking about a configuration problem (in my Domain.xml) or a
>>>> logging problem but I can not find it.
>>>>
>>>> Any idea ?
>>>>
>>>> Thanks.
>>>>
>>>> Thomas
>>>>
>>>> -- 
>>>> BELLEMBOIS Thomas
>>>> CRI, Université de Rennes 1
>>>> Campus de beaulieu
>>>> Avenue du Général Leclerc
>>>> 35042 RENNES Cedex
>>>> Tél.: 02.23.23.69.60
>>>> Mail: Thomas.Bellembois@univ-rennes1.fr
>>>>
>>>>
>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: slide-dev-unsubscribe@jakarta.apache.org
>>>> For additional commands, e-mail: slide-dev-help@jakarta.apache.org
>>>>
>>>>
>>>>   
>>>
>>>
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: slide-dev-unsubscribe@jakarta.apache.org
>>> For additional commands, e-mail: slide-dev-help@jakarta.apache.org
>>>
>>>  
>>>
>>
>>
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: slide-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: slide-dev-help@jakarta.apache.org
>


-- 
BELLEMBOIS Thomas
CRI, Université de Rennes 1
Campus de beaulieu
Avenue du Général Leclerc
35042 RENNES Cedex
Tél.: 02.23.23.69.60
Mail: Thomas.Bellembois@univ-rennes1.fr



---------------------------------------------------------------------
To unsubscribe, e-mail: slide-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: slide-dev-help@jakarta.apache.org


Re: QuotaInterceptor

Posted by Honoré David <dh...@oma.be>.
Thomas Bellembois wrote:

> Here is a part of my Domain.xml file :
>
> <store name="tx">
> ...
>    <!-- no param for this interceptor at the moment-->
>    <content-interceptor 
> class="org.apache.slide.content.QuotaInterceptor">
>    </content-interceptor>
> </store>
>
Humm ... no.

put them in

    <domain ...>
        <namespace ...>
            <store ...>
            </store>
            <configuration>
                <content-interceptor 
class="org.apache.slide.content.QuotaInterceptor"/>
            </configuration>
       ...
       ...
          </namespace>
    </domain>

> Is it the good place for interceptors configuration?
>
> and my log4j.xml file :
>
> <?xml version="1.0" encoding="UTF-8"?>
> <!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
> <log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/">
>      <appender name="OPIWEB_CONSOLE" 
> class="org.apache.log4j.ConsoleAppender">
>        <layout class="org.apache.log4j.PatternLayout">
>            <param name="ConversionPattern" value="%-5p (%C:%L) - %m%n"/>
>        </layout>
>    </appender>
>
>     <logger name="org.apache.slide.content">
>        <level value="DEBUG"/>
>        <appender-ref ref="OPIWEB_CONSOLE"/>
>    </logger>
> </log4j:configuration>
>
> I have tried with <logger name="org.apache.slide"> and classes of this 
> package are logged.
>
> Another question :
> Would it be better to use events and not interceptors for quotas ?
>
> Thanks.
>
> Thomas
>
>
> karl@gan.no wrote:
>
>> Please supply the Domain.xml and log4j.xml files, it would help us 
>> helping
>> you :-)
>>
>> Mvh Karl
>>
>>  
>>
>>> Hello,
>>>
>>> I am working on Slide quotas.
>>> I have some problems to start. If you could help me I would appreciate
>>> very much.
>>> I have made a new class (public class QuotaInterceptor implements
>>> ContentInterceptor) and I want to log its methods.
>>> I have declared the Slide servlet as the default servlet on my 
>>> Tomcat (I
>>> have read in the mailing list that Interceptors does not work if we
>>> don't do that, I don't know if this bug is fixed).
>>> I have declared an org.apache.slide.util.logger.SimpleLogger in my new
>>> class.
>>> I have a log4j.xml (and my Domain.xml) configured to log in debug mode
>>> (and it works with other classes).
>>> But apparently Slide does not used my Interceptor or my Interceptor 
>>> does
>>> not log.
>>> I have declared and configured it in my Domain.xml.
>>> I am thinking about a configuration problem (in my Domain.xml) or a
>>> logging problem but I can not find it.
>>>
>>> Any idea ?
>>>
>>> Thanks.
>>>
>>> Thomas
>>>
>>> -- 
>>> BELLEMBOIS Thomas
>>> CRI, Université de Rennes 1
>>> Campus de beaulieu
>>> Avenue du Général Leclerc
>>> 35042 RENNES Cedex
>>> Tél.: 02.23.23.69.60
>>> Mail: Thomas.Bellembois@univ-rennes1.fr
>>>
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: slide-dev-unsubscribe@jakarta.apache.org
>>> For additional commands, e-mail: slide-dev-help@jakarta.apache.org
>>>
>>>
>>>   
>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: slide-dev-unsubscribe@jakarta.apache.org
>> For additional commands, e-mail: slide-dev-help@jakarta.apache.org
>>
>>  
>>
>
>




---------------------------------------------------------------------
To unsubscribe, e-mail: slide-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: slide-dev-help@jakarta.apache.org


Re: QuotaInterceptor

Posted by Thomas Bellembois <th...@univ-rennes1.fr>.
Here is a part of my Domain.xml file :

<store name="tx">
...
    <!-- no param for this interceptor at the moment-->
    <content-interceptor class="org.apache.slide.content.QuotaInterceptor">
    </content-interceptor>
</store>

Is it the good place for interceptors configuration?

and my log4j.xml file :

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/">
   
    <appender name="OPIWEB_CONSOLE" 
class="org.apache.log4j.ConsoleAppender">
        <layout class="org.apache.log4j.PatternLayout">
            <param name="ConversionPattern" value="%-5p (%C:%L) - %m%n"/>
        </layout>
    </appender>

     <logger name="org.apache.slide.content">
        <level value="DEBUG"/>
        <appender-ref ref="OPIWEB_CONSOLE"/>
    </logger>
</log4j:configuration>

I have tried with <logger name="org.apache.slide"> and classes of this 
package are logged.

Another question :
Would it be better to use events and not interceptors for quotas ?

Thanks.

Thomas


karl@gan.no wrote:

>Please supply the Domain.xml and log4j.xml files, it would help us helping
>you :-)
>
>Mvh Karl
>
>  
>
>>Hello,
>>
>>I am working on Slide quotas.
>>I have some problems to start. If you could help me I would appreciate
>>very much.
>>I have made a new class (public class QuotaInterceptor implements
>>ContentInterceptor) and I want to log its methods.
>>I have declared the Slide servlet as the default servlet on my Tomcat (I
>>have read in the mailing list that Interceptors does not work if we
>>don't do that, I don't know if this bug is fixed).
>>I have declared an org.apache.slide.util.logger.SimpleLogger in my new
>>class.
>>I have a log4j.xml (and my Domain.xml) configured to log in debug mode
>>(and it works with other classes).
>>But apparently Slide does not used my Interceptor or my Interceptor does
>>not log.
>>I have declared and configured it in my Domain.xml.
>>I am thinking about a configuration problem (in my Domain.xml) or a
>>logging problem but I can not find it.
>>
>>Any idea ?
>>
>>Thanks.
>>
>>Thomas
>>
>>--
>>BELLEMBOIS Thomas
>>CRI, Université de Rennes 1
>>Campus de beaulieu
>>Avenue du Général Leclerc
>>35042 RENNES Cedex
>>Tél.: 02.23.23.69.60
>>Mail: Thomas.Bellembois@univ-rennes1.fr
>>
>>
>>
>>---------------------------------------------------------------------
>>To unsubscribe, e-mail: slide-dev-unsubscribe@jakarta.apache.org
>>For additional commands, e-mail: slide-dev-help@jakarta.apache.org
>>
>>
>>    
>>
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: slide-dev-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: slide-dev-help@jakarta.apache.org
>
>  
>


-- 
BELLEMBOIS Thomas
CRI, Université de Rennes 1
Campus de beaulieu
Avenue du Général Leclerc
35042 RENNES Cedex
Tél.: 02.23.23.69.60
Mail: Thomas.Bellembois@univ-rennes1.fr



---------------------------------------------------------------------
To unsubscribe, e-mail: slide-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: slide-dev-help@jakarta.apache.org


Re: QuotaInterceptor

Posted by ka...@gan.no.
Please supply the Domain.xml and log4j.xml files, it would help us helping
you :-)

Mvh Karl

> Hello,
>
> I am working on Slide quotas.
> I have some problems to start. If you could help me I would appreciate
> very much.
> I have made a new class (public class QuotaInterceptor implements
> ContentInterceptor) and I want to log its methods.
> I have declared the Slide servlet as the default servlet on my Tomcat (I
> have read in the mailing list that Interceptors does not work if we
> don't do that, I don't know if this bug is fixed).
> I have declared an org.apache.slide.util.logger.SimpleLogger in my new
> class.
> I have a log4j.xml (and my Domain.xml) configured to log in debug mode
> (and it works with other classes).
> But apparently Slide does not used my Interceptor or my Interceptor does
> not log.
> I have declared and configured it in my Domain.xml.
> I am thinking about a configuration problem (in my Domain.xml) or a
> logging problem but I can not find it.
>
> Any idea ?
>
> Thanks.
>
> Thomas
>
> --
> BELLEMBOIS Thomas
> CRI, Université de Rennes 1
> Campus de beaulieu
> Avenue du Général Leclerc
> 35042 RENNES Cedex
> Tél.: 02.23.23.69.60
> Mail: Thomas.Bellembois@univ-rennes1.fr
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: slide-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: slide-dev-help@jakarta.apache.org
>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: slide-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: slide-dev-help@jakarta.apache.org