Set the log prefix immediately after forking, based on the passed-in type