Sameeksha Raina
Sameeksha Raina

Reputation: 209

Slf4j vs Log4j - which one to use for logging in Spark cluster mode?

What is the difference between Slf4j and Log4j logging in Spark? How can Log4j be used for logging in Spark cluster mode?

Upvotes: 2

Views: 2653

Answers (1)

T. Gawęda
T. Gawęda

Reputation: 16076

Spark uses Log4j for logging, so you also can use it.

Note that Slf4j is only facade and you can use Slf4j with log4j, i.e. to have possibility to use slf4j's syntax in messages, like log.info("Message: {}", message);

Here you've got tutorial about logging in Spark

Upvotes: 3

Related Questions