class LogUtil {

    public static Timber.LogEvent textEvent(int level,
                                            String service,
                                            String source,
                                            String message)
    {
        return Timber.LogEvent.newBuilder()
            .setTimestamp(System.currentTimeMillis())
            .setConsistencyLevel(ConsistencyLevel.BESTEFFORT)
            .setLevel(level)
            .setHost(hostName)
            .setServiceName(service)
            .setSource(source)
            .setPid(0)
            .setTid((int) Thread.currentThread().getId())
            .setType("T")
            .addPayload(
                Timber.Payload.newBuilder()
                .setName("msg")
                .setPayload(ByteString.copyFromUtf8(message)))
            .build();
    }

}