              if self.args.preview:
                  with self.lock:
                      self.preview_buffer[name] = image
          except Exception as err:
              print("could not preview sample")
              raise err
 
</s> remove                 print("Saving model weights has been cancelled!")
 </s> add                 logger.info("Saving model weights has been cancelled!") </s> remove             raise ValueError("Error inititalizing Aligner")

        try:
            err = None
            err = out_queue.get(True, 1)
        except QueueEmpty:
            pass

        if err:
            if isinstance(err, str):
                queue_manager.terminate_queues()
                print(err)
                exit(1)
            else:
                queue_manager.get_queue("detect").put(err)
 </s> add             raise ValueError("Error initializing Aligner")

        logger.debug("Launched Aligner") </s> remove             print("Reading alignments from: {}".format(self.file))
 </s> add             logger.info("Reading alignments from: '%s'", self.file) </s> remove         print("Using live preview.\n"
              "Press 'ENTER' on the preview window to save and quit.\n"
              "Press 'S' on the preview window to save model weights "
              "immediately")
 </s> add         logger.info("Using live preview.\n"
                    "Press 'ENTER' on the preview window to save and quit.\n"
                    "Press 'S' on the preview window to save model weights "
                    "immediately") </s> remove             print(err)
 </s> add             logger.error(err)
            logging.error("could not preview sample")
              if self.args.preview:
                  with self.lock:
                      self.preview_buffer[name] = image
          except Exception as err:
            logging.error("could not preview sample")
              raise err
keep keep keep keep replace keep
 Logging (#541)

* Convert prints to logger. Further logging improvements. Tidy  up

* Fix system verbosity. Allow SystemExit

* Fix reload extract bug

* Child Traceback handling

* Safer shutdown procedure

* Add shutdown event to queue manager

* landmarks_as_xy > property. GUI notes + linting. Aligner bugfix

* fix FaceFilter. Enable nFilter when no Filter is supplied

* Fix blurry face filter

* Continue on IO error. Better error handling

* Explicitly print stack trace tocrash log

* Windows Multiprocessing bugfix

* Add git info and conda version to crash log

* Windows/Anaconda mp bugfix

* Logging fixes for training 
scripts/train.py