Hello! Don't abuse strongly, I yet very well know Java.

Program for Android.
The task: I need in the program the global object containing a string array with the information on a state of the program (logger).

I create class with a static array:

public class FoxLog {
private static ArrayList<String> logList = new ArrayList<String>();

public static int count() {
synchronized(logList) {
return logList.size();
}
}

public static String get(int index) {
synchronized(logList) {
return logList.get(index);
}
}

//Send a DEBUG log message.
static public int d(String tag, String msg) {
add('D', tag, msg);
return Log.d(tag, msg);
}
// Send a ERROR log message
static public int e(String tag, String msg) {
add('E', tag, msg);
return Log.e(tag, msg);
}
}

Method add for brevity eliminated.

Problem in that the program (for the Android) is executed in two different VM. The main flow – GUI and Service, and so similar variable logList different for the main flow and for service.
How to solve the given problem?