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 Richard Clark <ri...@cybrick.com> on 2003/06/25 20:13:50 UTC

How to hook into James/Phoenix Logging routines ?

Hi, I am new to James, and have also only been working with Java for a
few months (C die hard), so forgive me if I am missing a blatantly
obvious answer ;)

My question is, Is it possible (and how) to call/hook into the logging
functions of James.  

I have a mailet (which seems to be working fine) to process XML-RPC
calls in email attachments.  The mailet launches a handler object with a
call to Apache's XmlRpcServer.execute().  

What I want to be able to do is perform logging to the James
mailet-xxxxxxx.log from withing my XmlRpcHandler object which has no
knowledge of the GenericMailet object.

Thanks in advance for any pointers.

-Richard C


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


RE: How to hook into James/Phoenix Logging routines ?

Posted by Steve Brewin <sb...@synsys.com>.
If you want to use mailet logging you are going to have to pass your
XmlRpcHandler an object that implements
org.apache.mailet.MailetContext as this is the interface that defines the
logging methods.

One way to get such an object is with the getMailetContext() method in
GenericMailet.

-- Steve

> -----Original Message-----
> From: Richard Clark [mailto:richardc@cybrick.com]
> Sent: 25 June 2003 19:14
> To: james-user@jakarta.apache.org
> Subject: How to hook into James/Phoenix Logging routines ?
>
>
> Hi, I am new to James, and have also only been working with Java for a
> few months (C die hard), so forgive me if I am missing a blatantly
> obvious answer ;)
>
> My question is, Is it possible (and how) to call/hook into the logging
> functions of James.
>
> I have a mailet (which seems to be working fine) to process XML-RPC
> calls in email attachments.  The mailet launches a handler
> object with a
> call to Apache's XmlRpcServer.execute().
>
> What I want to be able to do is perform logging to the James
> mailet-xxxxxxx.log from withing my XmlRpcHandler object which has no
> knowledge of the GenericMailet object.
>
> Thanks in advance for any pointers.
>
> -Richard C
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: james-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: james-user-help@jakarta.apache.org
>


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


RE: How to hook into James/Phoenix Logging routines ?

Posted by "Noel J. Bergman" <no...@devtech.com>.
> What I want to be able to do is perform logging to the James
> mailet-xxxxxxx.log from withing my XmlRpcHandler object which
> has no knowledge of the GenericMailet object.

One way or another, you need to provide your handler with access to a
logging method.  There are various ways to accomplish that task.

	--- Noel


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