code: public static String getId(IoSession session) {
          String result = LOG_ID_ATTRIBUTE.get(session);
          if (result == null) {
              result = session.getTransportMetadata().getName() + "#" + session.getId();
              String user = LoggingUtils.getUserIdentifier(session);
              if (user != null) {
                  result = result + " " + user;
              }
              LOG_ID_ATTRIBUTE.set(session, result);
          }
          return result;
      }
docs: Gets the identifying attributes of a session as a short string useful for logging purposes.
  Example return values: wsn#34 127.0.0.0.1:41234, wsn#34 joe 127.0.0.0.1:41234
  @param session
  @return a short string including the numerical session ID, transport name and user or host and port details