Add logging.

This commit is contained in:
Steve Checkoway
2008-10-05 05:53:29 +00:00
parent 0b7c9fff0c
commit f92d70163c
@@ -57,6 +57,7 @@ bool HIDDevice::Open( io_object_t device )
pid = 0;
if( !InitDevice(vid, pid) )
{
LOG->Warn( "Couldn't initialize device." );
CFRelease( properties );
return false;
}
@@ -68,10 +69,12 @@ bool HIDDevice::Open( io_object_t device )
}
if( m_sDescription == "" )
m_sDescription = ssprintf( "%04x:%04x", vid, pid );
LOG->Trace( "\t\tDevice description: %s", m_sDescription.c_str() );
object = CFDictionaryGetValue( properties, CFSTR(kIOHIDElementKey) );
if ( !object || CFGetTypeID(object) != CFArrayGetTypeID() )
{
LOG->Warn( "Couldn't get HID elements." );
CFRelease( properties );
return false;
}