summaryrefslogtreecommitdiffstats
path: root/jack-server
diff options
context:
space:
mode:
authormikaelpeltier <mikaelpeltier@google.com>2015-04-01 13:54:27 +0200
committermikaelpeltier <mikaelpeltier@google.com>2015-04-01 13:54:27 +0200
commit8d3de6f6064425abbd66232fbf51d91838e5ab65 (patch)
tree846a05672e26a159a991af99038e9b8993cae513 /jack-server
parent657e03597761d7806ed3d0d59dd9644abfa83b24 (diff)
downloadtoolchain_jack-8d3de6f6064425abbd66232fbf51d91838e5ab65.zip
toolchain_jack-8d3de6f6064425abbd66232fbf51d91838e5ab65.tar.gz
toolchain_jack-8d3de6f6064425abbd66232fbf51d91838e5ab65.tar.bz2
Enable log server even after the first compilation
Change-Id: Ieb65a945af8c6413c4ee74416415d25c4d6f44b8
Diffstat (limited to 'jack-server')
-rw-r--r--jack-server/src/com/android/jack/server/JackSimpleServer.java20
1 files changed, 15 insertions, 5 deletions
diff --git a/jack-server/src/com/android/jack/server/JackSimpleServer.java b/jack-server/src/com/android/jack/server/JackSimpleServer.java
index 6393653..baca0d1 100644
--- a/jack-server/src/com/android/jack/server/JackSimpleServer.java
+++ b/jack-server/src/com/android/jack/server/JackSimpleServer.java
@@ -27,6 +27,7 @@ import com.android.sched.util.file.OutputStreamFile;
import com.android.sched.util.file.WrongPermissionException;
import com.android.sched.util.findbugs.SuppressFBWarnings;
import com.android.sched.util.location.NoLocation;
+import com.android.sched.util.log.LoggerFactory;
import com.android.sched.util.log.tracer.probe.MemoryBytesProbe;
import com.android.sched.util.log.tracer.probe.TimeNanosProbe;
@@ -86,6 +87,20 @@ import javax.annotation.Nonnull;
* Server controlling the number of Jack compilations that are executed simultaneously.
*/
public class JackSimpleServer {
+
+ static {
+ // It seems that loggers must be created from parents to children to have the loggers
+ // correctly initialized. Thus load the initial configuration that define specific level
+ // for some packages firstly. Otherwise the parent logger of JackSimpleServer is not created
+ // before JackSimpleServer logger. Create the JackSimpleServer logger in first means that
+ // it will not have com.android.jack.server as parent even if it is created after.
+ LoggerFactory.loadLoggerConfiguration(JackSimpleServer.class, "/initial.logging.properties");
+ }
+
+
+ @Nonnull
+ private static Logger logger = Logger.getLogger(JackSimpleServer.class.getName());
+
private static int port;
@Nonnull
@@ -123,9 +138,6 @@ public class JackSimpleServer {
@Nonnull
private static ServerTask service = new ServerTaskInsideVm();
- @Nonnull
- private static Logger logger = Logger.getLogger(JackSimpleServer.class.getSimpleName());
-
private static final int CMD_IDX_CMD = 0;
private static final int CMD_IDX_OUT = 1;
private static final int CMD_IDX_ERR = 2;
@@ -169,8 +181,6 @@ public class JackSimpleServer {
abort();
}
- logger = Logger.getLogger(JackSimpleServer.class.getSimpleName() + "." + port);
-
int count = 0;
try {
count = Integer.parseInt(args[CLI_IDX_COUNT]);