help-smalltalk
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Help-smalltalk] Re: Logging facility for GNU-smalltalk


From: Paolo Bonzini
Subject: Re: [Help-smalltalk] Re: Logging facility for GNU-smalltalk
Date: Thu, 09 Jul 2009 15:42:49 +0200
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1b3pre) Gecko/20090513 Fedora/3.0-2.3.beta2.fc11 Lightning/1.0pre Thunderbird/3.0b2


Agreed, that's the point of the output handler no?  My idea of the class
hierarchy would be:

   OutputHandler
     StreamOutputHandler
       TextOutputHandler
       HTMLOutputHandler
     SyslogOutputHandler

I don't know anything about how to talk to a syslogd. Why can
SyslogOutputHandler not be a StreamOutputHandler?

You use the syslog(3) function directly, which handles priorities as a separate argument rather than as part of the message.

       void openlog(const char *ident, int option, int facility);
       void syslog(int priority, const char *format, ...);
       void closelog(void);

But alternatively, you could use a socket connected to UDP port 514, which would indeed be a stream. That's cool too.

Want your messages plain text? That's the default.
As HTML? Use a HTMLFiter.
Have them spelled backwards? Go develop your ReversingFilter yourself.

It might also be possible that I'm talking about exactly the same thing
as Paolo, only with different words.

More or less. You're adding a DecoratorOutputHandler to the hierarchy above.

I'm not sure whether HTML fits under DecoratorOutputHandler or StreamOutputHandler. Definitely ReversingOutputHandler would be a decorator, but I hadn't thought about it. :-)

Paolo




reply via email to

[Prev in Thread] Current Thread [Next in Thread]