Commit 663eb1d4 authored by Andre Freyssinet's avatar Andre Freyssinet

Logging enhancements, adds user identifier in message.

parent 2f578537
/* /*
* JORAM: Java(TM) Open Reliable Asynchronous Messaging * JORAM: Java(TM) Open Reliable Asynchronous Messaging
* Copyright (C) 2001 - 2019 ScalAgent Distributed Technologies * Copyright (C) 2001 - 2021 ScalAgent Distributed Technologies
* Copyright (C) 2004 France Telecom R&D * Copyright (C) 2004 France Telecom R&D
* Copyright (C) 2003 - 2004 Bull SA * Copyright (C) 2003 - 2004 Bull SA
* Copyright (C) 1996 - 2000 Dyade * Copyright (C) 1996 - 2000 Dyade
...@@ -1024,12 +1024,12 @@ public final class UserAgent extends Agent implements UserAgentMBean, ProxyAgent ...@@ -1024,12 +1024,12 @@ public final class UserAgent extends Agent implements UserAgentMBean, ProxyAgent
public void run() { public void run() {
if (logger.isLoggable(BasicLevel.DEBUG)) if (logger.isLoggable(BasicLevel.DEBUG))
logger.log(BasicLevel.DEBUG, "HeartBeatTask: run - key=" + key); logger.log(BasicLevel.DEBUG, "HeartBeatTask: " + userId + " run - key=" + key);
long date = System.currentTimeMillis(); long date = System.currentTimeMillis();
if ((date - lastRequestDate) > timeout) { if ((date - lastRequestDate) > timeout) {
if (logger.isLoggable(BasicLevel.WARN)) if (logger.isLoggable(BasicLevel.WARN))
logger.log(BasicLevel.WARN, "HeartBeatTask: close connection - key=" + key); logger.log(BasicLevel.WARN, "HeartBeatTask: " + userId + " close connection - key=" + key);
Channel.sendTo(userId, (Notification) new CloseConnectionNot2(key.intValue())); Channel.sendTo(userId, (Notification) new CloseConnectionNot2(key.intValue()));
this.cancel(); this.cancel();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment