static Random random = new Random();
static ThreadLocalTSerializer tSerializer = new ThreadLocalTSerializer();
static ThreadLocalTDeserializer tDeserializer = new ThreadLocalTDeserializer();
public static LogEvent genRandomLogEvent(int maxMessageSize) {
LogEvent logEvent = new LogEvent();
logEvent.createdTime = System.currentTimeMillis();
logEvent.hostId = "localhost";
int value = random.nextInt(5);
logEvent.logLevel = LogLevel.findByValue(value);
int size = random.nextInt(maxMessageSize) + 1;