I have to use a logging framework in my zope product. The logging framework makes it mandatory to use the same object instance to fire various logging calls (like log start, log end). I want to store the object instance somewhere so that I can use it from any module in my zope product. I tried to store it in context._ProductContext__app. There are two patch classes of httprequest and httpresponse inside which the context is not available. How do I do this in Zope-2.8.8 Thanks Roopesh
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Roopesh P Raj wrote:
I have to use a logging framework in my zope product. The logging framework makes it mandatory to use the same object instance to fire various logging calls (like log start, log end). I want to store the object instance somewhere so that I can use it from any module in my zope product.
I disagree on the need to use a global: you should just be able to call 'logging.getLogger("yourapp")' and use the instance which comes back. Tres. - -- =================================================================== Tres Seaver +1 540-429-0999 tseaver@palladion.com Palladion Software "Excellence by Design" http://palladion.com -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iEYEARECAAYFAksVSzgACgkQ+gerLs4ltQ7mJQCfT8l37V7RWX8MvmtpklHw2FrR TkMAn3azqJsj0WxcROprl1s3FqEnn2EC =/fpV -----END PGP SIGNATURE-----
participants (2)
-
Roopesh P Raj -
Tres Seaver