Logging under Java API

Post here your questions about the Java client / Android API for SFS2X

Moderators: Lapo, Bax

User avatar
Site Admin
Posts: 21588
Joined: 21 Mar 2005, 09:50
Location: Italy

Logging under Java API

Postby Lapo » 04 Nov 2013, 09:14

The Java/Android API use the common SLF4J interface/library for logging.

This means that the logging system is not dependent on a specific implementation and you can easily swap the implementation of your choice at runtime by simply deploying a couple of jar files together with the API.

By default we ship the API with the "simple" logging api which provide a basic, console-only logging system with a fixed logging Level.
You can easily swap the default logger with your favorite.

1) Download the SLF4J distribution from http://www.slf4j.org/
2) Remove the slf4j-simple-1.6.1.jar from the API lib/ folder and replace it with the one of your choice.

» Using the JDK logger:
From the SLF4J distribution copy the slf4j-jdk14-x.y.z.jar to the API lib/ folder

» Using Log4J:
From the SLF4J distribution copy the slf4j-log4j12-x.y.z.jar to the API lib/ folder
...addicted to flash games

Return to “SFS2X Java / Android API”

Who is online

Users browsing this forum: No registered users and 4 guests