0

I am new to Spring Cloud Task. I am trying to setup the Hello World Sample application. It runs and everything seems fine as per the example here. However i see below output. I see some slf4j warnings. However my understanding is spring boot should provide default setup. Any reason why i see different log file?

SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.

  .   ____          _            __ _ _
 /\\ / ___'_ __ _ _(_)_ __  __ _ \ \ \ \
( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
 \\/  ___)| |_)| | | | | || (_| |  ) ) ) )
  '  |____| .__|_| |_|_| |_\__, | / / / /
 =========|_|==============|___/=/_/_/_/
 :: Spring Boot ::        (v1.5.9.RELEASE)

Hello World!

My application.properties already have this.

logging.level.org.springframework.cloud.task=DEBUG
spring.application.name=demo

EDIT When I have added spring batch starter to my pom the logs started displaying fine and the slf4j warning are gone. I guess slf4j configuration is missing if we only have spring cloud task. Is there any specific reason it is configured like that specific for spring cloud task ?

Chetan Joshi
  • 5,582
  • 4
  • 30
  • 43
Sushil Behera
  • 817
  • 6
  • 20

1 Answers1

0

Based on the SLF4J documentation (https://www.slf4j.org/codes.html#StaticLoggerBinder), that error is due to the fact that you haven't added a logging impl. You can address this by adding the Spring Boot Starter for logging or add your own logging dependencies.

Chetan Joshi
  • 5,582
  • 4
  • 30
  • 43
Michael Minella
  • 20,843
  • 4
  • 55
  • 67
  • I understand and I already able to see if i make those changes. My question was more why we do not see default implementation? like we see for spring batch starter. is there any specific reason cloud task is designed like that? – Sushil Behera Dec 26 '17 at 16:54