Simplify logging.

If user is None, work it out automatically.

Change-Id: I81608239d28099ad57bd839c4d80baf59c3c5a03