_layout = (LogLayout)Class.forName(s).newInstance();
} catch (ConfigurationError e) {
e.fillInStackTrace();
throw e;
} catch (Throwable t) {
throw new ConfigurationError("Couldn't create log layout: "+s+", reason: "+t.toString());
}
} else {
throw new ConfigurationError("Unknown log layout '"+_layout+"'");
}
_target = prefs.getTarget();
if (_target.equals("stderr")) {
_output = System.err;
_flush = false;
} else if (_target.equals("stdout")) {
_output = System.out;
_flush = false;
} else {
try {
_output = new BufferedOutputStream(new FileOutputStream(_target));
} catch (IOException e) {
throw new ConfigurationError("Couldn't open log file '"+_target+"'");
}
}
}