Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Check the source code to see more details.

Defining which factory to use

Now you must tell XWork/Struts2 to use your implementation, just define system property like below:

-Dxwork.loggerFactory=com.demo.MyLoggerFactory

you can use the same to explicit tell the framework which implementation to use and don't depend on class discovery, eg.:

-Dxwork.loggerFactory=com.opensymphony.xwork2.util.logging.slf4j.Slf4jLoggerFactory

will enable Slf4j even if there is commons-logging on classpath available (commons-logging is the first LoggerFactory to look for).