Skip to content

Instantly share code, notes, and snippets.

@ygaller
Created July 24, 2017 19:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ygaller/db9e514c9f9354b8e183757a2e2f1627 to your computer and use it in GitHub Desktop.
Save ygaller/db9e514c9f9354b8e183757a2e2f1627 to your computer and use it in GitHub Desktop.
public class RequestLogFactory {
private Logger logger;
public RequestLogFactory(Logger logger) {
this.logger = logger;
}
AbstractNCSARequestLog create() {
return new AbstractNCSARequestLog() {
@Override
protected boolean isEnabled() {
return true;
}
@Override
public void write(String s) throws IOException {
logger.info(s);
}
};
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment