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

com.nitorcreations.willow.utils.LoggingStreamPumper Maven / Gradle / Ivy

There is a newer version: 2.0.2
Show newest version
package com.nitorcreations.willow.utils;

import java.io.InputStream;
import java.nio.charset.Charset;
import java.util.logging.Level;
import java.util.logging.Logger;

public class LoggingStreamPumper extends AbstractStreamPumper {
  private Logger log;
  private Level level;

  public LoggingStreamPumper(InputStream in, Level level, String name, Charset charset) {
    super(in, name, charset);
    this.level = level;
    this.log = Logger.getLogger(name);
  }

  @Override
  public void handle(String line) {
    log.log(level, line);
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy