if (logger == null) {
if (writer instanceof Loggable) {
logger = ((Loggable) writer).getLogger();
loggerFactory = ((Loggable) writer).getLoggerFactory();
} else {
LoggerImpl li = new LoggerImpl(writer);
logger = li;
loggerFactory = li;
}
}
printWriter = writer;