1

I tried using java util logging as given in the MF8 tutorial. I am able to see the logging in MF console.

java.util.logging.Logger

If I want to use another Logging API for my project, eg. log4j. What are required configuration to be done to get the logs in console?

Is it like MF8 console supports only Java Util for Console logging?

Also, are there any sample server.xml where I can set the logging levels?

Prisy
  • 90
  • 11

1 Answers1

2

MobileFirst allows you to use any logging framework, it does not force you to use the java.util.logging API. You can simply instantiate any other logger (log4j, slf4j, etc...) in the adapter and use it. Anything you log through any logging framework will appear in the server log files, however it will not be sent to the analytics service automatically.

That being said, there is a separate and completely unrelated API to send data to the analytics service. This API has nothing to do with the logging framework used.

Moty Drimer
  • 181
  • 4
  • Thanks Drimer! So this means that if we use logging API other than java util, we cant see the logs in the console? I tried a few samples hitting using log4j, those logs are not seen in MF console. – Prisy Aug 30 '16 at 06:04