Dispose the logger when the client gets disposed.