~~NOTOC~~ [[use_exported_control_api]] > [[BS2_GetFilteredLogFromDirWithKey]] ---- ===== BS2_GetFilteredLogFromDirWithKey===== [+2.8.2] Gets the log after a given log record ID from the data extracted by USB by a maximum of amount. ==== Declaration ==== #include "BS_API.h" int BS2_GetFilteredLogFromDirWithKey(void* context, const char* szDir, char* uid, BS2_EVENT_CODE eventCode, BS2_TIMESTAMP start, BS2_TIMESTAMP end, uint8_t tnakey, BS2Event** logsObj, uint32_t* numLog, const BS2EncryptKey* key); [[Log_Management_API#BS2Event|View the structure of the BS2Event]] ==== Parameters ==== * [In] ''//context//'' : Context * [In] ''//szDir//'' : Data storage path * [In] ''//uid//'' : User identifier, if NULL, means all users. * [In] ''//eventCode//'' : Log event code, 0 means all events. * [In] ''//start//'' : The start time of the condition search, 0 means there is no limit. * [In] ''//end//'' : The last time of the condition search and 0 means there is no limit. * [In] ''//tnakey//'' : TNA key, 0 means all TNA keys. * [Out] ''//logsObj//'' : Pointer to store the address of the log record * [Out] ''//numLog//'' : Number of log records * [In] ''//key//'' : Encryption key and the key value specified by [[BS2_SetDataEncryptKey]] **Note**\\ The logsObj variable must return memory to the system after use via the [[BS2_ReleaseObject]] function. ==== Return value ==== Returns ''BS_SDK_SUCCESS'' if performed successfully, or a corresponding error code if an error occurs. ==== See Also ==== [[BS2_GetUserDatabaseInfoFromDirWithKey]]\\ [[BS2_GetUserListFromDirWithKey]]\\ [[BS2_GetUserInfosFromDirWithKey]]\\ [[BS2_GetUserDatasFromDirWithKey]]\\ [[BS2_GetUserInfosExFromDirWithKey]]\\ [[BS2_GetUserDatasExFromDirWithKey]]\\ [[BS2_GetLogFromDirWithKey]]\\ [[BS2_GetLogBlobFromDirWithKey]]