All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.amazon.redshift.logger.LogConsoleHandler Maven / Gradle / Ivy

The newest version!
package com.amazon.redshift.logger;

import java.io.PrintWriter;

public class LogConsoleHandler implements LogHandler {
	
  private final PrintWriter writer = new PrintWriter(System.out);

  @Override
  public synchronized void write(String message) throws Exception
  {
      writer.println(message);
      writer.flush();
  }
  
  @Override
  public synchronized void close() throws Exception {
  	// Do nothing as Writer is on the stdout.
  }
  
  @Override
  public synchronized void flush() {
  	if (writer != null) {
  		writer.flush();
  	}
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy