posted 18 years ago
I ended up with a simpler scheme. I now have a LogWriter, which is just a Writer, not a PrintWriter. It doesn't need to do fancy threading. Then, to get a PrintWriter, as required by JavaDB, I just construct a PrintWriter with a LogWriter as the wrapped Writer.
Note that it's JavaDB that insists on having a PrintWriter. Would Log4J have given me a PrintWriter for free? I have a lot of code using my logger, so it would be hard to switch everything to another logger. Where using third-party code with a different log system, I write an adapter to mine; I have one for Log4J, JDK Logging, Apache Commons Logging etc.
Betty Rubble? Well, I would go with Betty... but I'd be thinking of Wilma.