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

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

There is a newer version: 2.1.0.30
Show 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