Logging camera access on OS X Yosemite and up
I'm not certain how you would do it natively, but by pure coincidence I discovered this today, from Obdev, the makers of Little Snitch.  


  Micro Snitch
  
  Ever wondered if an application records audio through your Mac’s built-in microphone without your knowledge? Or if the camera captures video for no good reason?
  
  With Micro Snitch there’s no doubt anymore. This ultra-light menu bar application operates inconspicuously in the background. It monitors and reports any microphone and camera activity to help you figure out if someone’s spying on you.  
  
  Logging
  
  Never miss any microphone or camera activity, even in your absence. Every status change is logged to a file, so you can review it later to find suspicious activities.


€3.99 direct, or also on Mac App Store showing at $3.99 US or £2.99 UK

No affiliation, &amp; I haven't tried it myself; I'm just a satisfied user of Little Snitch.