[prev in list] [next in list] [prev in thread] [next in thread] 

List:       pyamf-users
Subject:    Re: [pyamf-users] PyAMF and logger
From:       Nick Joyce <nick () boxdesign ! co ! uk>
Date:       2009-06-25 18:45:14
Message-ID: 47C3E095-307E-4795-96A7-B93EF710C74E () boxdesign ! co ! uk
[Download RAW message or body]

Hi,

In PyAMF 0.4.2 and down, there is no logger kwarg for the Gateway  
class, each instance creates a logger automagically. In the soon to be  
released PyAMF 0.5 all loggers are switched off and you have to supply  
them as shown in the wiki.

You should be able to add a handler to gw.logger as normal and it all  
just work.

I will update the wiki to reflect the current documentation.

Hth,

Nick

On 25 Jun 2009, at 19:35, vitaly@synapticvision.com wrote:

> Hi all,
>
> I'm trying to log the pyAMF request/response like:
>
> logging.basicConfig(
>    level=logging.DEBUG,
>    format='%(asctime)s %(levelname)-5.5s [%(name)s] %(message)s'
> )
> ...
> gateway = TwistedGateway(services, logger=logging,  
> expose_request=False)
> ...
>
> and the following error come up:
>
> File "/usr/share/pyamf/pyamf/remoting/gateway/twisted.py", line 197,  
> in __init__
>    gateway.BaseGateway.__init__(self, *args, **kwargs)
> TypeError: __init__() got an unexpected keyword argument 'logger'
>
>
> I've took the example from:
> http://pyamf.org/wiki/TwistedHowto
> but I run the snip like: python abc.py and not from .tac file.
> All works just fine except while I'm trying to use the logger.
>
> What am I missing guys?
> Or may be there is a more easy way just to log the pyAMF request/ 
> response?
>
> Appreciate the help.
>
> _______________________________________________
> PyAMF users mailing list - users@pyamf.org
> http://lists.pyamf.org/mailman/listinfo/users

_______________________________________________
PyAMF users mailing list - users@pyamf.org
http://lists.pyamf.org/mailman/listinfo/users

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic