Microsoft Hardware Dev Center: https://docs.microsoft.com/en-us/windows-hardware/drivers/install/setupapi-logging--windows-vista-and-later-
In Windows Vista and later versions of Windows, SetupAPI includes the following logging components:
The Plug and Play (PnP) manager and SetupAPI log information about installation events in the device installation text log ( SetupAPI.dev.log ) and the application installation text log ( SetupAPI.app.log ). The device installation text log contains information about device and driver installations and the application installation text log contains information about application software installations that are associated with device driver installations. For more information about the content of SetupAPI text logs, see SetupAPI Text Logs, and for information about how to enable logging, see SetupAPI Logging Registry Settings.
The SetupAPI logging functions, which PnP device installation applications, class installers, and co-installers can use to write log entries to the SetupAPI text logs. For information about how to use these functions, see Using the SetupAPI Logging Functions.
USB Forensics Final Part! (aka Pt. 7) Device first/last plugged in - Hats Off Security
Window XP and Vista setupapi.log - digfor
Tracking USB First insertion in Event logs - Yogesh Khatri's forensic blog