Is it possible to record user agent information on node creation? I have a custom content type, Picture, which has only a single required image field.  Since this field is required, I thought that it should be impossible for users to save a node without uploading a file, but every once in awhile there is a node created that has no file uploaded.

Users have permission to create nodes of type Picture but not to edit them.

To try to troubleshoot this problem, I would like to record the user agent information (browser, etc.) of users when they create nodes of this content type.  Is there a "standard" way to go about this?

I'm on Drupal 7 if it matters.
I would probably use a combination of hook_node_insert and watchdog (to keep UA info off of nodes and because it is really a logging exercise).

Example (this is totally untested and off the top of my head):

function MYMODULE_node_insert($node){
  if ($node-&gt;type == 'MY_NODE_TYPE') {
    // Check for the empty value however you want here.
    // e.g. Field API, EntityMetaDataWrapper, or whatever
    if (!isset($node-&gt;field_MY_IMAGE_FIELD[$node-&gt;language][0])) {
      $user_agent = $_SERVER['HTTP_USER_AGENT'];
      $account = $_GLOBALS['user'];
      $message = t('Empty image field created by !uid using !user_agent',
        array('!uid' =&gt; $account-&gt;uid, '!user_agent' =&gt; $user_agent));
      watchdog('MYMODULE', $message, WATCHDOG_NORMAL);
    }
  }
}