Using Slf4j via Lombok annotations and it is successful in java main thread.
But when I try to execute a logic using new Thread:
new Thread(() -> eatSandwich());
Logs from eatSandwich()
are not being logged in console. Without thread, logs are showing so Slf4j configuration does not seem to be the culprit. I am a beginner in multi-threading so I might be doing something wrong.
Tried:
new Thread(() -> eatSandwich());
And expected logs to show up.