本文へスキップ

BS2_SetDebugFileLog

+ v2.6.3 The log messages in the SDK can be output to a file, which can be used for debugging applications.

The file can be specified as an absolute path or a relative path, and log messages generated during the operation of the SDK will be automatically stored in the corresponding path.

The file name to be saved is in the form of YYYYMMDD.log.

Declaration​

#include "BS_API.h"

int BS2_SetDebugFileLog(uint32_t level, uint32_t module, const char* logPath);

Parameter​

  • [In] level : Debug level

    MacroValueDescription
    DEBUG_LOG_FATAL0x00000001Fatal error
    DEBUG_LOG_ERROR0x00000002Normal error
    DEBUG_LOG_WARN0x00000004Warning
    DEBUG_LOG_INFO0x00000008Information including errors
    DEBUG_LOG_TRACE0x00000100Information for SDK self-debugging purposes
    DEBUG_LOG_OPERATION_ALL0x000000FFAll the logs except TRACE
    DEBUG_LOG_ALL0xFFFFFFFFAll information
  • [In] module : Specified module

    MacroValueDescription
    DEBUG_MODULE_KEEP_ALIVE0x00000001Keep alive module
    DEBUG_MODULE_SOCKET_MANAGER0x00000002Socket management module
    DEBUG_MODULE_SOCKET_HANDLER0x00000004Socket handling module
    DEBUG_MODULE_DEVICE0x00000008Device module
    DEBUG_MODULE_DEVICE_MANAGER0x00000010Device management module
    DEBUG_MODULE_EVENT_DISPATCHER0x00000020Event dispatcher module
    DEBUG_MODULE_API0x00000040API
    DEBUG_MODULE_MISC0x00000080etc
    DEBUG_MODULE_ALL0xFFFFFFFFAll module
  • [In] logPath : Path log file is stored

Return Value​

If successfully done, BS_SDK_SUCCESS will be returned.

If there is an error, the corresponding error code will be returned.

このページは役に立ちましたか?