Need to over-engineer Logger


#1

I would be nice if Logger had a getCurrentLogger() so this way, you can have multiple subclasses of Logger “install” themselves into a chain of loggers by remembering the previous logger, installing itself, performing a custom action on logMessage(), and then being able to call the previous logger in the chain.

In my case, I have one Logger that captures ALL messages and stores them in a StringArray, and sometimes I want to have a DocumentWindow with a TextEditor that displays the messages. It is possible to have multiple of these DocumentWindow instances up, or none, but I always want the basic StringArray Logger to be there.

Yeah of course I can do this without a getCurrentLogger() but I’m just saying…we should over-engineer it :slight_smile:


#2

Yeah, the Logger is on my list of “old classes that could probably do with a re-think”.