class SyslogUtils {

  public static String getIP(SocketAddress socketAddress) {
    try {
      InetSocketAddress inetSocketAddress = (InetSocketAddress) socketAddress;
      String ip = inetSocketAddress.getAddress().getHostAddress();
      if (ip != null) {
        return ip;
      } else {
        throw new NullPointerException("The returned IP is null");
      }
    } catch (Exception e) {
      logger.warn("Unable to retrieve client IP address", e);
    }
    // return a safe value instead of null
    return "";
  }

  public  SyslogUtils();
  public  SyslogUtils(boolean isUdp);
  public  SyslogUtils(Integer defaultSize, Set<String> keepFields, boolean isUdp);
  public  SyslogUtils(Integer eventSize, Set<String> keepFields, boolean isUdp, Clock clock);

}