return o.toString();
}
@SuppressWarnings("rawtypes")
private String getArgsStr(TBase o, LoggerArgsState loggerArgsState) {
ResetableTMemoryBuffer buffer = loggerArgsState._buffer;
TJSONProtocol tjsonProtocol = loggerArgsState._tjsonProtocol;
buffer.resetBuffer();
tjsonProtocol.reset();
try {
o.write(tjsonProtocol);
} catch (TException e) {
LOG.error("Unknown error tyring to write object [{0}] to json.", e, o);
}
byte[] array = buffer.getArray();
int length = buffer.length();
return new String(array, 0, length);
}
};
return (T) Proxy.newProxyInstance(clazz.getClassLoader(), new Class[] { clazz }, handler);
}