} catch (Exception e) {
logger.error("Could not open ObjectInputStream to " + socket, e);
closed = true;
}
ILoggingEvent event;
Logger remoteLogger;
try {
while (!closed) {
// read an event from the wire
event = (ILoggingEvent) ois.readObject();
// get a logger from the hierarchy. The name of the logger is taken to
// be the name contained in the event.
remoteLogger = context.getLogger(event.getLoggerName());
// apply the logger-level filter
if (remoteLogger.isEnabledFor(event.getLevel())) {
// finally log the event as if was generated locally
remoteLogger.callAppenders(event);
}
}
} catch (java.io.EOFException e) {