try
{
ErrorLogPublisher errorLogPublisher =
TextErrorLogPublisher.getStartupTextErrorPublisher(
new TextWriter.STREAM(out));
DebugLogPublisher debugLogPublisher =
TextDebugLogPublisher.getStartupTextDebugPublisher(
new TextWriter.STREAM(out));
ErrorLogger.addErrorLogPublisher(errorLogPublisher);
DebugLogger.addDebugLogPublisher(debugLogPublisher);
}