I messed up with the copy paste, it's complaining about lots of
categories,
including sitemap.transformer.i18n

-----Original Message-----
From: Ard Schrijvers [mailto:[EMAIL PROTECTED] 
Sent: Friday, March 17, 2006 1:34 PM
To: [email protected]
Subject: RE: Cannot override general.field-required

>There's no log file produced. In the console I see:

>PoolThread-4/LoggerSwitch.SwitchingLogger: Logger for category 
>sitemap.serializer.html not defined in configuration. New Logger
created 
>and returned

Well, it is comlaining about another logger that is not defined
(sitemap.serializer.html)...

Furhtermore, using your logkit, results for me in a log file under :
WEB-INF/logs/i18n.log that logs i18n stuff:

For example,
2006-03-17 13:27:52.078 DEBUG 
sitemap.transformer.i18n
(preview.xxx.ard:50102/nl/onderwerpen) main-7/I18nTransformer: 
name=messages, location=site://translations
2006-03-17 13:27:52.078 DEBUG 
sitemap.transformer.i18n
(preview.xxx.ard:50102/nl/onderwerpen) main-7/I18nTransformer: 
name=messages, location=site://translations

also telling me where it tries to find the messages.

AS

> 
> sitemap:
> 
>     <map:components>
> 
>         <map:generators default="file">
>             <map:generator name="jx" 
> src="org.apache.cocoon.generation.JXTemplateGenerator" 
> label="content" 
> logger="sitemap.generator.jx"/>
>         </map:generators>
> 
>     <map:transformers default="xslt">
>       <map:transformer name="multi-i18n" 
> logger="sitemap.transformer.i18n" 
> src="org.apache.cocoon.transformation.I18nTransformer">
>             <catalogues default="default">
>               <catalogue id="forms" name="messages">
>                 <location>resources/translation</location>
>                 
> <location>resource://org/apache/cocoon/forms/system/i18n</location>
>               </catalogue>
>               <catalogue id="default" name="messages" 
> location="resources/translation"/>
>             </catalogues>
>           </map:transformer>
>     </map:transformers>
>     </map:components>
> 
> logkit:
> 
> <logkit log-level="DEBUG">
> 
>   <!--+
>       | Factories are responsible to create the consumers of 
> the log events,
>       | the targets. Here we have configured just a few, the 
> main cocoon
>       | target factory (that prints to a file) and the servlet target 
> factory
>       | (that prints back to the servlet container log 
> stream) but  for more
>       | info on the available logkit factories, please consult
>       | 
> http://excalibur.apache.org/apidocs/org/apache/avalon/excalibu
> r/logger/factory/package-summary.html
>       +-->
>   <factories>
>     <factory class="org.apache.cocoon.util.log.CocoonTargetFactory" 
> type="cocoon"/>
>     <factory 
> class="org.apache.avalon.excalibur.logger.factory.ServletTarge
> tFactory" 
> type="servlet"/>
>     <factory 
> class="org.apache.avalon.excalibur.logger.factory.StreamTarget
> Factory" 
> type="stream"/>
>   </factories>
> 
>   <!--+
>       | Targets are the instances of the consumers of the log 
> events and 
> various
>       | instances can be configured and referenced via their 'id'.
>       | Note how the element name of the target indicates 
> what type of 
> factory
>       | that is created with.
>       +-->
>   <targets>
> 
>     <cocoon id="main">
>       <!--+
>           | <filename> is the absolute location of the log file, note 
> how you can
>           | use the ${context-root} variable to indicate the 
> root of the
>           | cocoon web application (the directory that 
> contains WEB-INF, 
> that is)
>           +-->
>       <filename>${context-root}/WEB-INF/logs/cocoon.log</filename>
> 
>       <!--+
>           | <format> indicates how the log event should be serialized.
>           | Note that newlines are *not* automatic: you have 
> to specify the
>           | newline as '\n' or everything will appear on a 
> single line!
>           |
>           | The first format below is verbose: it includes error 
> stacktraces.
>           | If you want something even more verbose use %{throwable} 
> which will
>           | show a full chain of exceptions. Using the second 
> format won't
>           | output stacktraces at all.
>           |
>           | Please mind that the default format logs request 
> uri along with
>           | query string. This may log confidential data 
> (passwords etc.).
>           +-->
>       <format type="cocoon">%5.5{priority} %{time} [%{category}] 
> (%{uri}%{query}) %{thread}/%{class:short}: 
> %{message}\n%{rootThrowable}</format>
>       <!--format type="cocoon">%5.5{priority} %{time} [%{category}] 
> (%{uri}%{query}) %{thread}/%{class:short}: %{message}\n%</format-->
> 
>       <!--+
>           | <append> if set to 'true' will make cocoon append 
> the events
>           | to the existing file, if set to 'false' cocoon 
> will override
>           | the existing ones at every new start.
>           +-->
>       <append>false</append>
> 
>       <!--+
>           | <rotation> allows you to rotate log files one 
> they meet certain
>           | criteria. If you uncomment the example below, the 
> log files will
>           | be rotated once they are a day old or bigger than 100 Mb.
>       <rotation type="unique" pattern="yyyyMMdd" suffix=".log">
>         <or>
>           <size>100m</size>
>           <time>24:00:00</time>
>         </or>
>       </rotation>
>           +-->
>     </cocoon>
> 
>     <cocoon id="deprecation">
>       
> <filename>${context-root}/WEB-INF/logs/deprecation.log</filename>
>       <format type="cocoon">%5.5{priority} %{time} [%{category}] 
> (%{uri}%{query}) %{thread}/%{class:short}: %{message}\n</format>
>       <append>false</append>
>     </cocoon>
> 
>     <cocoon id="i18n">
>       <filename>${context-root}/WEB-INF/logs/i18n.log</filename>
>       <format type="cocoon">
>         %23.23{time:yyyy-MM-dd' 'HH:mm:ss.SSS} %5.5{priority} 
> %40.40{category} (%{host}%{uri}) %{thread}/%{class:short}: 
> %{message}\n%{throwable}
>       </format>
>       <append>false</append>
>       <rotation pattern="-yyyy-MM-dd_HH.mm" suffix=".log" 
> type="unique">
>         <or>
>           <size>10m</size>
>           <time>24:00:00</time>
>         </or>
>       </rotation>
>     </cocoon>
> 
> 
>     <servlet id="servlet">
>       <format type="extended">%5.5{priority} %5.5{time} 
> [%8.8{category}] 
> (%{context}): %{message}\n</format>
>     </servlet>
> 
>     <stream id="console">
>       <stream>System.out</stream>
>       <format type="extended">%5.5{priority} %5.5{time} 
> [%8.8{category}] 
> (%{context}): %{message}\n</format>
>     </stream>
>   </targets>
> 
>   <!--+
>       | Categories 'route' log events to particular targets, filtering
>       | on importance level (one of DEBUG, INFO, WARN, ERROR, 
> FATAL_ERROR,
>       | ordered from most verbose to least verbose) and on 
> the 'category'
>       | used by the producer of the log event to further classify it.
>       | Some of these log categories are hardwired in the 
> code and some
>       | others are user-selectable, for example for sitemap components
>       | where you can specify the category in their sitemap 
> declaration.
>       |
>       | Category names can be dot-separated (example, 
> 'sitemap.generator.file')
>       | and the variuos pieces are treated as 
> 'sub-categories'. By nesting
>       | the <category> element you achieve sub-category filtering and 
> you can
>       | even have different log level filtering per category and 
> subcategory.
>       | (See the comments below for an example of this)
>       |
>       | NOTE: not all subcategories are defined in this file. 
> Not defined
>       | subcategories will be created automatically and they 
> will inherit
>       | the settings of the parent subcategory. When defining 
> a subcategory
>       | manually, it is required that you specify the log 
> target, because
>       | they are not inherited in this case.
>       +-->
>   <categories>
> 
>     <!--+
>         | This is the main category. The empty name attribute 
> indicates that
>         | this rule will match all log events from all categories.
>         +-->
>     <category log-level="INFO" name="">
>       <log-target id-ref="main"/>
>     </category>
> 
>     <!--+
>         | This is the deprecation category. If this category 
> is set to WARN
>         | the log will contain messages about deprecated stuff used by
>         | your application.
>         +-->
>     <category log-level="WARN" name="deprecation">
>       <log-target id-ref="deprecation"/>
>     </category>
> 
>       <category log-level="WARN" name="sitemap">
>         <category log-level="WARN" name="transformer">
>                 <category log-level="DEBUG" name="i18n">
>                         <log-target id-ref="i18n"/>
>                 </category>
>         </category>
>       </category>
> 
> 
>     <!--+
>         | This is a little more elaborate example, where some of the 
> logs are
>         | sent to the log file and some others (the ones 
> related to the 
> sitemap),
>         | are sent to the servlet container (where they could 
> be further 
> relayed
>         | to the console, for example)
>         |
>     <category log-level="ERROR" name="">
>       <category log-level="DEBUG" name="sitemap">
>         <log-target id-ref="servlet"/>
>       </category>
>       <category log-level="INFO" name="access">
>         <log-target id-ref="console"/>
>       </category>
>       <log-target id-ref="core"/>
>     </category>
>         +-->
> 
>   </categories>
> 
> </logkit>
> 
> 
> Ard Schrijvers wrote:
> 
> > can you mail your logkit.xconf and the sitemap part where 
> you declare 
> > your i18n transformer? 
> >
> >
> >
> > >
> > > There's no log file produced. In the console I see:
> > >
> > > PoolThread-4/LoggerSwitch.SwitchingLogger: Logger for category
> > > sitemap.serializer.html not defined in configuration. New
> > > Logger created
> > > and returned
> > >
> > > Thanks
> > >
> > > Ard Schrijvers wrote:
> > >
> > > > I don't think guessing is the way to go when something does
> > > not work:
> > > > Make sure you find out what is going wrong through logs:
> > > >
> > > > So, add to your i18n:transformer a logger, for example like:
> > > >
> > > > <map:transformer name="i18n" logger="sitemap.transformer.i18n"
> > > > src="org.apache.cocoon.transformation.I18nTransformer">
> > > >
> > > > Go to your logkit.xconf
> > > >
> > > > Add in targets
> > > >
> > > > <cocoon id="i18n">
> > > >       <filename>${context-root}/WEB-INF/logs/i18n.log</filename>
> > > >       <format type="cocoon">
> > > >         %23.23{time:yyyy-MM-dd' 'HH:mm:ss.SSS} %5.5{priority}
> > > > %40.40{category} (%{host}%{uri}) %{thread}/%{class:short}:
> > > > %{message}\n%{throwable}
> > > >       </format>
> > > >       <append>false</append>
> > > >       <rotation pattern="-yyyy-MM-dd_HH.mm" suffix=".log"
> > > type="unique">
> > > >         <or>
> > > >           <size>10m</size>
> > > >           <time>24:00:00</time>
> > > >         </or>
> > > >       </rotation>
> > > > </cocoon>
> > > >
> > > > Add in categories  (not the levels that are already in, but
> > > make sure
> > > > you have at least the piece below, probably only have to
> > > add the i18n
> > > > part )
> > > >
> > > > <category log-level="WARN" name="sitemap">
> > > >         <category log-level="WARN" name="transformer">
> > > >                 <category log-level="DEBUG" name="i18n">
> > > >                         <log-target id-ref="i18n"/>
> > > >                 </category>
> > > >         </category>
> > > > </category>
> > > >               
> > > >
> > > > Restart cocoon, do the request again, and look in the 
> WEB-INF under
> > > > logs folder in i18n.log: I know I had your problem before,
> > > and I don't
> > > > know how I fixed it, but just make sure you know how to 
> debug your
> > > > cocoon app and you will find the solution (which you 
> will probably
> > > > will forget as well: important is that you know how to
> > > handle debugger
> > > > stuff)
> > > >
> > > > AS
> > > >
> > > >
> > > > >
> > > > > With a different name it still doesn't work.
> > > > > >
> > > > > It may sound weird but I get the same error when I put
> > > the translation
> > > > > in the folder named 'i18n'. When I rename it to something
> > > different it
> > > > > does work.
> > > > >
> > > > > Jasha Joachimsthal
> > > > >
> > > > > ---------
> > > > > > > > Hi again,
> > > > > > >
> > > > > > >   I have looked up how to override the CForms 
> localization,
> > > > > > > but it's now
> > > > > > > working.
> > > > > > >
> > > > > > > In my subsitemap I have:
> > > > > > >
> > > > > > >     <map:transformers default="xslt">
> > > > > > >       <map:transformer name="i18n"
> > > > > > > src="org.apache.cocoon.transformation.I18nTransformer">
> > > > > > >             <catalogues default="default">
> > > > > > >               <catalogue id="forms" name="messages">
> > > > > > >                 <location>resources/i18n</location>
> > > > > > >               
> > > > > > >
> > > > >
> > > 
> <location>resource://org/apache/cocoon/forms/system/i18n</location>
> > > > > > >               </catalogue>
> > > > > > >               <catalogue id="default" name="messages"
> > > > > > > location="resources/i18n"/>
> > > > > > >             </catalogues>
> > > > > > >           </map:transformer>
> > > > > > >     </map:transformers>
> > > > > > >
> > > > > > >
> > > > > > > In resources/i18n/messages.xml I have:
> > > > > > >
> > > > > > > <?xml version="1.0" encoding="UTF-8"?>
> > > > > > > <catalogue xml:lang="en">
> > > > > > > <message key="general.field-required">This is a required
> > > > > > > field</message>
> > > > > > > </catalogue>
> > > > > > >
> > > > > > >
> > > > > > > But I keep on getting the untranslated key as the message.
> > > > > > >
> > > > > >
> > > > > > It probably can't find the folder resources/i18n from the
> > > > > point where
> > > > > > your sitemap is.
> > > > > > Keep in mind that calling 
> <location>resources/i18n</location>
> > > > > > means it's
> > > > > > relative to where you are. Did you check that?
> > > > > >
> > > >
> > > >
> > > > --
> > > >
> > > > Hippo
> > > > Oosteinde 11
> > > > 1017WT Amsterdam
> > > > The Netherlands
> > > > Tel  +31 (0)20 5224466
> > > > -------------------------------------------------------------
> > > > [EMAIL PROTECTED] / http://www.hippo.nl
> > > > --------------------------------------------------------------
> > > >
> > > > > >
> > > >
> > > >
> > > 
> ---------------------------------------------------------------------
> > > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > > For additional commands, e-mail: [EMAIL PROTECTED]
> > > >
> > >
> > >
> > > --
> > > --
> > > Fernando D. Mato Mira                         [EMAIL PROTECTED]
> > > Thomson Corporation Switzerland AG
> > >
> > >
> > > 
> ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > For additional commands, e-mail: [EMAIL PROTECTED]
> > >
> > >
> >
> > 
> ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> 
> 
> -- 
> --
> Fernando D. Mato Mira                         [EMAIL PROTECTED]
> Thomson Corporation Switzerland AG
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to