I want to give a background on the requirement, so that you can understand my problem better.
We were mainly using log4j for following purposes:
>I dont want logs to be written to the default Android's adb which is what "android.util.Log.d" is doing. My end user will share that file via email for me to debug their issues/problems.
>We wanted to ALWAYS redirect the logs to a file rather than default logging console of Android.
>We have two layers - application layer and middleware layer. Log4j was thread-safe to post logs
>All other platforms like Windows were using log4j and we were aligned with other platforms of our application.
The code we follow is exactly like in "https://github.com/loune/log4j2-android" . Our application was using v2.3 of log4j-api and log4j-core. And it was fine and due to some issue we wanted to upgrade and we faced the problem.
We were doing following:
1)On the app launch, we initialised log4j as in the example app using my "xml configuration" file as shown in https://github.com/loune/log4j2-android/blob/master/Log4jExampleApp/app/src/main/java/net/loune/log4jexampleapp/App.java
2) After that user can anytime change the logging levels through a menu option and when the user changes the log level, we used below code to update log levels.
LoggerContext ctx = (LoggerContext) LogManager.getContext(false);
Configuration config = ctx.getConfiguration();
LoggerConfig loggerConfig = config.getLoggerConfig(LogManager.ROOT_LOGGER_NAME);
This was my total use-case.
In latest release of log4j-api-android , I am not able to see any methods which can get my config file and give me a output file with logs written. As much as I understand it writes logs to the android logging console which is not my use-case.
I am not able to proceed. Is it just possible to remove the "java 9" classes from log4j-core and give us a release addressing our use-case.
Sorry to trouble you guys. We have been benefitted by your library greatly which was very much robust. Please help us here.
-Ajitha Yasmin S