excalibur-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Leif Mortenson <leifli...@tanukisoftware.com>
Subject SMTPTargetFactory for logging with Fortress
Date Mon, 26 Jul 2004 05:01:35 GMT
I have been spending today attempting to figure out how to use the
SMTPTargetFactory with Fortress.

As I understand it, you would place something like the following in your
.xlog file:

<factory type="smtp"
<factory type="priority-filter"

<priority-filter id="admin-mail" log-level="WARN">
<smtp context-key="smtp-session-context">
<format type="extended">
%7.7{priority} [%32.32{category}] (%{context}): %{message}\n%{throwable}

The problem that I am running into is that the SMTPTargetFactory looks for a
JavaMail Session instance in the context of the factory. Tracing back
through the
code, this context appears to be the root context which is passed to the
DefaultContainerManager constructor when starting up Fortress.

That Context object is obtained by calling getContext on my FortressConfig
instance, and is thus read only.

My question is: What is the preferred way to set values in the Fortress
context? Or, if I am going down the wrong track, how do I get the SMTP
Factory working? :-)

I was also wondering why the SMTPTargetFactory simply does not allow you
to specify the SMTP host in its configuration. If that was possible,
then it would
be easy to completely self contain the configuration information for
sending the
log events.


To unsubscribe, e-mail: dev-unsubscribe@excalibur.apache.org
For additional commands, e-mail: dev-help@excalibur.apache.org
Apache Excalibur Project -- URL: http://excalibur.apache.org/

View raw message