When we want to add a printer to mac, we go to "Printers and Scanners" in system preferences. There we click on "+" button and click on "Add Printer or Scanner". In new dialog with title "Add", we see a list of printers.
When we select one of the printer: printer-x, we see status: "Gathering printer information...". And its driver is automatically selected. How is Mac gathering printer information? What is this whole process of adding a printer in details? Is there any tutorial/article that can help? I have tried google search, could not find something of good interest yet.
I want to debug a situation where Mac is choosing driver for a printer sometime and sometimes it does not (for the same printer). Expected driver to see there is AirPrint. The printer is being added from a print server. So, want to have a look at what is happening in the background.