replace sysout with logger

This commit is contained in:
2017-03-19 09:20:00 +01:00
parent 9ab5d76d93
commit ea905c2315
2 changed files with 15 additions and 3 deletions

View File

@@ -17,6 +17,8 @@ import org.lucares.pdbui.domain.PlotResponse;
import org.lucares.performance.db.CollectionUtils;
import org.lucares.recommind.logs.InternalPlottingException;
import org.lucares.recommind.logs.Plotter;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.http.MediaType;
import org.springframework.stereotype.Controller;
@@ -31,6 +33,8 @@ import org.springframework.web.bind.annotation.ResponseBody;
@EnableAutoConfiguration
public class PdbController implements HardcodedValues, CollectionUtils {
private static final Logger LOGGER = LoggerFactory.getLogger(PdbController.class);
private final Plotter plotter;
private final PdbRepository db;
@@ -53,7 +57,9 @@ public class PdbController implements HardcodedValues, CollectionUtils {
final Path relativeImagePath = plotter.getOutputDir().relativize(image.toPath());
final String relativeImgUrl = relativeImagePath.toString().replace('\\', '/');
return new PlotResponse(WEB_IMAGE_OUTPUT_PATH + "/" + relativeImgUrl);
final String imageUrl = WEB_IMAGE_OUTPUT_PATH + "/" + relativeImgUrl;
LOGGER.trace("image url: {}", imageUrl);
return new PlotResponse(imageUrl);
}
@RequestMapping(path = "/autocomplete", //