修改:日志输出

This commit is contained in:
梁显优 2023-04-12 21:09:32 +08:00
parent 6c49e7c3f6
commit a8788b419d

View File

@ -128,6 +128,7 @@ public class ZHubClient extends AbstractConsumer implements IConsumer, IProducer
value += s; // value value += s; // value
} while (clen > 0 && clen > strLength(value)); } while (clen > 0 && clen > strLength(value));
logger.finest("topic[" + topic + "]: " + value);
// lock msg // lock msg
if ("lock".equals(topic)) { if ("lock".equals(topic)) {
@ -166,6 +167,7 @@ public class ZHubClient extends AbstractConsumer implements IConsumer, IProducer
reader.readLine(); //$n len(key) reader.readLine(); //$n len(key)
String topic = reader.readLine(); // name String topic = reader.readLine(); // name
logger.finest("timer[" + topic + "]: ");
timerQueue.add(timerMap.get(topic)); timerQueue.add(timerMap.get(topic));
continue; continue;
} }
@ -208,7 +210,6 @@ public class ZHubClient extends AbstractConsumer implements IConsumer, IProducer
if ((event = topicQueue.take()) == null) { if ((event = topicQueue.take()) == null) {
continue; continue;
} }
logger.log(Level.FINE, "topic[" + event.topic + "] :" + event.value);
accept(event.topic, event.value); accept(event.topic, event.value);
} catch (InterruptedException e) { } catch (InterruptedException e) {
e.printStackTrace(); e.printStackTrace();
@ -216,7 +217,7 @@ public class ZHubClient extends AbstractConsumer implements IConsumer, IProducer
logger.log(Level.WARNING, "topic[" + event.topic + "] event accept error :" + event.value, e); logger.log(Level.WARNING, "topic[" + event.topic + "] event accept error :" + event.value, e);
} }
} }
}, 1); }, 16);
// rpc back // rpc back
threadBuilder.accept(() -> { threadBuilder.accept(() -> {