You are viewing a plain text version of this content. The canonical link for it is here.
Posted to server-user@james.apache.org by "rafael.munoz" <ra...@gmail.com> on 2009/01/02 18:14:03 UTC

logs: link a category to several targets

Hello

Is there any way to link a category to several targets? My problem is that I
want to write to a file all the logs from category A but also want to send
by email (using SMTPTargetFactory) the log with level ERROR of this same
category.

Something like this (that is not possible because the category names should
be unique):

 <categories>
      <category name="James.Mailet" log-level="INFO">
        <log-target id-ref="James-target-file"/>
      </category>
      <category name="James.Mailet" log-level="ERROR">
        <log-target id-ref="James-target-erro"/>
      </category>
<categories>

<targets>
      <file id="James-target-file">
        <filename>${LOG.FILE}</filename>
        <append>true</append>
      </file>
      <smtp id="target-id" context-key="context-key-to-session-object">
            <format type="raw|pattern|extended">pattern to be used if
needed</format>
            <to>address-1@host</to>
            <to>address-N@host</to>
            <from>address@host</from>
            <subject>subject line</subject>
            <maximum-size>number</maximum-size>
            <maximum-delay-time>seconds</maximum-delay-time>
       </smtp>
</targets>

regards and thanks in advance,
Rafael Munoz
-- 
View this message in context: http://www.nabble.com/logs%3A-link-a-category-to-several-targets-tp21254196p21254196.html
Sent from the James - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org
For additional commands, e-mail: server-user-help@james.apache.org