In order to show output, there needs to be both slf4j-api as well as exactly one slf4j implementation binding (such as slf4j-simple or logback or whatever) in the classpath. This means:
- If you're writing some kind of library (either for internal use by other modules you maintain, or "for the public"), you should depend only on slf4j-api and not have a compile- or runtime-declared implementation binding dependency.
- If you're writing some end application, you need to include the implementation binding dependency, though it can probably be runtime-scoped rather than compile-scoped.
If you're expecting to "see" something when you "run the project", then either:
- This is some kind of library, and you're doing some kind of unit or integration testing on your library, and so you should include an implementation binding dependency (like slf4j-simple) in your testing classpath (so that you see output while testing, but it's not used by whatever depends on your library). Or,
- This is some kind of end application, so there should be an implementation binding dependency defined in compile or runtime scopes. If you're not sure what you want to use eventually, that's fine, just pick something to use for now that does simple logging to the console, since SLF4J makes it easy to replace later. Many logging frameworks easily support having separate configurations for "production" as opposed to testing, and I think it's fairly common to have the testing configuration basically just log to console.
IntelliJ IDEA will automatically display anything printed to the console. Also, many run configuration types have a "Log" tab that lets one specify log files to scan and also display while an application is being run. So, if you do want a testing logging configuration that has logging to multiple files and the like, you can generally configure IDEA to be able to let you see those as well while your application is running.
My experience is much more with Maven than with Gradle, but I believe the concept of dependency scope of compile, runtime, and test translate fairly straightforwardly to Gradle. Please ask if you need more specific clarification.