I’m using SLF4J for the first time in my Maven project, but I can’t get it to output anything (its creators evidently don’t subscribe to the “useful default behavior” philosophy).
I added the following to my pom.xml:
<dependency>
<groupId>com.googlecode.sli4j</groupId>
<artifactId>sli4j-slf4j-simple</artifactId>
<version>2.0</version>
<type>jar</type>
<scope>compile</scope>
</dependency>
And I’m using it like this:
final Logger logger = LoggerFactory.getLogger(UdpRemoteConnection.class);
...
logger.error("test error");
Right now I don’t need anything fancy, I just need it to log to the console. How do I enable this?
It seems that you are using Sli4j instead of Slf4j.
Try to use Slf4j directly:
(I use 1.5.11 as slg4j.version, but latest available is 1.6.1)