while (true) {
// read an event from the wire
ILoggingEvent 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.
Logger remoteLogger = lc.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 (EOFException ex) {
// this is normal and expected