Re: zopectl run & logging

Andreas Gabriel <[email protected]>
Newsgroups gmane.comp.web.zope.german
Organization Hochschulrechenzentrum Philipps-Universitaet Marburg
Message-ID <[email protected]>
Hi Andreas,

Andreas Jung schrieb:
> On 30.06.09 18:35, Andreas Gabriel wrote:
> Ich meinte, dass mich bei meinen Apps üblicherweise nur das Logging
> innerhalb
> meines eigenen Codes interessiert und das Logging innerhalb von Zope für
> mich uninteressant ist. 

d.h. Du benutzt nicht das logging module, sondern irgendwas anderes
(print, etc.)? Oder fügst Du einen neuen logging Handler hinzu?

> Deinen Usecase auch das Logging von Zope-Modulen
> mitzubekommen wird dadurch nicht abgedeckt. Eventuell kannst Du in
> Deiner Applikation
> den Logger-Initialisierungscode von Zope dediziert selbst ausführen
> (lib/python/Zope2/Startup..
> schau mal nach setupInitialLogging()...) - der entsprechende Code zur
> Loggerinitialisierung
> wird von Zope wirklich nur ausgeführt, wenn man den Appserver hochfährt
> (nicht via "zopectl run").

Die Sache ist leider nicht so trivial, da man nicht an die
ZopeStarter-Instanz herankommt.

zope's "get_startup_cmd" erweitert das Startkommando um

  "[SNIP] from Zope2 import configure; configure(\'%s\');[SNIP]"

"configure(\'%s\')" würde die ZopeStarter-Instanz zurückgeben. Der Wert
wird aber keiner Variablen zugewiesen und scheint auch nicht global
verfügbar zu sein.

Gruß
Andreas

-- 
Dr. Andreas Gabriel, Hochschulrechenzentrum
Hans-Meerwein-Str., 35032 Marburg, fon +49 (0)6421 28-23560 fax -26994
----------------- Philipps-Universitaet Marburg ----------------------



_______________________________________________
zope mailing list
[email protected]
https://mail.dzug.org/mailman/listinfo/zope
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.