      elif serializer == "pickle":
          return PickleSerializer
      elif serializer == "yaml" and yaml is not None:
          return YAMLSerializer
      elif serializer == "yaml" and yaml is None:
          print("You must have PyYAML installed to use YAML as the serializer.\n"
                "Switching to JSON as the serializer.", file=sys.stderr)
      return JSONSerializer
  
  
  def get_serializer_from_ext(ext):
      if ext == ".json":
 
</s> remove     elif serializer == "yaml" and yaml is not None:
 </s> add     if serializer == "yaml" and yaml is not None: </s> remove     elif serializer == "pickle":
 </s> add     if serializer == "pickle": </s> remove     elif ext in (".yaml", ".yml") and yaml is not None:
 </s> add     if ext in (".yaml", ".yml") and yaml is not None: </s> remove     elif ext in (".yaml", ".yml") and yaml is None:
        print("You must have PyYAML installed to use YAML as the serializer.\n"
              "Switching to JSON as the serializer.", file=sys.stderr)
 </s> add     if ext in (".yaml", ".yml") and yaml is None:
        logger.warning("You must have PyYAML installed to use YAML as the serializer.\n"
                       "Switching to JSON as the serializer.") </s> remove     elif ext == ".p":
 </s> add     if ext == ".p":
    if serializer == "yaml" and yaml is None:
        logger.warning("You must have PyYAML installed to use YAML as the serializer."
                       "Switching to JSON as the serializer.")
      elif serializer == "pickle":
          return PickleSerializer
      elif serializer == "yaml" and yaml is not None:
          return YAMLSerializer
    if serializer == "yaml" and yaml is None:
        logger.warning("You must have PyYAML installed to use YAML as the serializer."
                       "Switching to JSON as the serializer.")
    if serializer == "yaml" and yaml is None:
        logger.warning("You must have PyYAML installed to use YAML as the serializer."
                       "Switching to JSON as the serializer.")
    if serializer == "yaml" and yaml is None:
        logger.warning("You must have PyYAML installed to use YAML as the serializer."
                       "Switching to JSON as the serializer.")
      return JSONSerializer
  
  
  def get_serializer_from_ext(ext):
      if ext == ".json":
keep keep keep keep replace replace 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/Serializer.py