      def check_display():
          """ Check whether there is a display to output the GUI. If running on
              Windows then assume not running in headless mode """
          if not os.environ.get("DISPLAY", None) and os.name != "nt":
              print("No display detected. GUI mode has been disabled.")
              if platform.system() == "Darwin":
                  print("macOS users need to install XQuartz. "
                        "See https://support.apple.com/en-gb/HT201341")
              exit(1)
  
 
</s> remove                 print("macOS users need to install XQuartz. "
                      "See https://support.apple.com/en-gb/HT201341")
 </s> add                 logger.info("macOS users need to install XQuartz. "
                            "See https://support.apple.com/en-gb/HT201341") </s> remove                 "install the TkInter application.\n\n"
                "You can try:\n"
                "  Anaconda:           conda install tk\n"
                "  Windows/macOS:      Install ActiveTcl Community "
                "Edition from http://www.activestate.com\n"
                "  Ubuntu/Mint/Debian: sudo apt install python3-tk\n"
                "  Arch:               sudo pacman -S tk\n"
                "  CentOS/Redhat:      sudo yum install tkinter\n"
                "  Fedora:             sudo dnf install python3-tkinter\n")
 </s> add                 "install the TkInter application. You can try:")
            logger.info("Anaconda: conda install tk")
            logger.info("Windows/macOS: Install ActiveTcl Community Edition from "
                        "http://www.activestate.com")
            logger.info("Ubuntu/Mint/Debian: sudo apt install python3-tk")
            logger.info("Arch: sudo pacman -S tk")
            logger.info("CentOS/Redhat: sudo yum install tkinter")
            logger.info("Fedora: sudo dnf install python3-tkinter") </s> remove             print("WARNING: missing_frames was selected with move output, but "
                  "there will be nothing to move. "
                  "Defaulting to output: console")
 </s> add             logger.warning("Missing_frames was selected with move output, but there will "
                           "be nothing to move. Defaulting to output: console") </s> remove             print("WARNING: There are rotated frames in the alignments "
                  "file.\n\t Position of faces will not be correctly "
                  "calculated for these frames.\n\t You should run rotation "
                  "tool to update the file prior to running sort:\n\t "
                  "'python tools.py alignments -j rotate -a "
                  "<alignments_file> -fr <frames_folder>'")
 </s> add             logger.error("There are rotated frames in the alignments "
                         "file. Position of faces will not be correctly "
                         "calculated for these frames. You should run rotation "
                         "tool to update the file prior to running sort: "
                         "'python tools.py alignments -j rotate -a "
                         "<alignments_file> -fr <frames_folder>'") </s> remove         if self.verbose:
            print("Folder exists at {}".format(self.folder))
 </s> add         logger.verbose("Folder exists at '%s'", self.folder)
            logger.warning("No display detected. GUI mode has been disabled.")
      def check_display():
          """ Check whether there is a display to output the GUI. If running on
              Windows then assume not running in headless mode """
          if not os.environ.get("DISPLAY", None) and os.name != "nt":
            logger.warning("No display detected. GUI mode has been disabled.")
              if platform.system() == "Darwin":
                  print("macOS users need to install XQuartz. "
                        "See https://support.apple.com/en-gb/HT201341")
              exit(1)
  
keep keep keep keep replace keep keep keep keep 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 
lib/cli.py