[#160] Removed unnecessary Slf4j loggers

fixes #160
This commit is contained in:
Marcin Grzejszczak
2016-02-18 11:23:09 +01:00
parent cf6f629663
commit c0620c410c
16 changed files with 69 additions and 68 deletions

View File

@@ -19,7 +19,8 @@ package sample;
import java.util.Random;
import java.util.concurrent.Callable;
import org.slf4j.Logger;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.context.embedded.EmbeddedServletContainerInitializedEvent;
import org.springframework.cloud.sleuth.Span;
@@ -37,8 +38,7 @@ import org.springframework.web.client.RestTemplate;
@RestController
public class SampleController implements
ApplicationListener<EmbeddedServletContainerInitializedEvent> {
private static final Logger log = org.slf4j.LoggerFactory
.getLogger(SampleController.class);
private static final Log log = LogFactory.getLog(SampleController.class);
@Autowired
private RestTemplate restTemplate;
@Autowired
@@ -93,7 +93,7 @@ ApplicationListener<EmbeddedServletContainerInitializedEvent> {
Span span = this.tracer.startTrace("http:customTraceEndpoint",
new AlwaysSampler());
int millis = this.random.nextInt(1000);
log.info("Sleeping for {} millis", millis);
log.info(String.format("Sleeping for [%d] millis", millis));
Thread.sleep(millis);
this.tracer.addTag("random-sleep-millis", String.valueOf(millis));
@@ -106,7 +106,7 @@ ApplicationListener<EmbeddedServletContainerInitializedEvent> {
@RequestMapping("/start")
public String start() throws InterruptedException {
int millis = this.random.nextInt(1000);
log.info("Sleeping for {} millis", millis);
log.info(String.format("Sleeping for [%d] millis", millis));
Thread.sleep(millis);
this.tracer.addTag("random-sleep-millis", String.valueOf(millis));