Add encoding to logging module.