Adding LogEncoder and LogEncoderTest