[bfprog] OS Module Nerfed, Plus

Forrest Thiessen thiessen at cyberscapearena.com
Fri Jun 24 15:45:52 PDT 2005


That's a great idea, will do!

Does that mean that the default behavior (what host.log does) sends
things to the console?  On the Windows server it seems to go nowhere; I
haven't tried Linux yet (I was kind of waiting for a Linux server that
actually worked).

--Forrest


ScratchMonkey wrote:

> --On Friday, June 24, 2005 12:30 PM -0600 Forrest Thiessen
> <thiessen at cyberscapearena.com> wrote:
>
>> I think this is best handled by a plug-in.  It's easy to do, just four
>> lines:
>>   import sys
>>   logFile = open('mylog.log', 'a')
>>   sys.stdout = logFile
>>   sys.stderr = logFile
>>
>> Put this in a .py file, drop it in the "custom" directory (and maybe
>> register it, as described above), and you've got a debugging logging
>> facility.
>
>
> I'd recommend making it work like "tee", so that it adds a new sink to
> the outputs, rather than replacing them. That way the output continues
> to go to the console.
>
> It might be better to create a publisher module that initially
> subscribes the existing stdout and stderr but allows other sources
> (eg. rcon terminals) to subscribe. Strings sent to this module go out
> to all subscribers.
>
>
> _______________________________________________
> BFProg mailing list
> BFProg at lists.matureasskickers.net
> http://lists.matureasskickers.net/mailman/listinfo/bfprog



More information about the BFProg mailing list