Fix logging encoding and IP