Put ProcessLogger-related code into their own functions.

This puts the logging for publishLocal into a separate function. The logging
for publish is defined within the scope of publishDocker, as it is most
convenient for accessing and modifying the value of the volatile variable
"loginRequired".