[python-win32] com server instantiation mess
Niki Spahiev
niki at vintech.bg
Mon Nov 22 11:02:09 CET 2004
Sprinzing, Thomas wrote:
> Anyway, here's my problem (i wrote this to mark, and he proposed to post
> it here)
>
> I wrote a com object which basically wraps the python logging module.
> Then, from within some strange application, i instantiate two
> different jscript threads running in an embedded Windows script host.
> These are for accessing the logging com object. So i want to have two
> distinctive loggers, one logger "A" logging to A.log, one logger B
> logging to B.log.
> I get them as expected, but: if i log a message to one of the loggers,
> it gets written to both logfiles. So there is a problem on python side
> with the instantiation. I'll append my pythonscript at the end.
> Actually, I'm not too familiar on how to solve this - where should i go
> and look?
try
self.logger=logging.getLogger('myloggerA')
for first object and
self.logger=logging.getLogger('myloggerB')
for second object
HTH
Niki Spahiev
More information about the Python-win32
mailing list