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>addres...@host</to>
            <to>addres...@host</to>
            <from>addr...@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: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to