Skip to content
This SDK only works with devices released within the past 3 years. We regularly optimize and update the SDK to ensure compatibility and performance. We do not guarantee compatibility or provide technical support for devices older than 3 years.

# NET_SDK_SetLogToFile

### Interface Definition

C++C#

    1
    2
    3
    4
    5
    BOOL NET_SDK_SetLogToFile(
        BOOL bLogEnable = FALSE,
        char* strLogDir = NULL,
        BOOL bAutoDel = TRUE,
        int logLevel = YLOG_DEBUG);

    1
    2
    3
    4
    5
    public static extern bool NET_SDK_SetLogToFile(
        bool bLogEnable,
        string strLogDi,
        bool bAutoDel,
        int logLevel);

### Function Description

SDK log configuration, closed by default.

### Parameter Description

Parameters | Type | Remark
--- | --- | ---
bLogEnablein | BOOL | Whether to enable console logging and output logs to local files. The default value is FALSE.
strLogDirin | char* | Local file saving path, note: Please use absolute path, do not use relative path.
bAutoDelin | BOOL | The automatic deletion function is currently deprecated and can be passed at random.
logLevelin | int | The level of output log, refer to `YLOG_LEVEL`.

### Return Value

- Type：BOOL

- Remark：Returns TRUE if successful, FALSE if failed.

### Remarks

None

Error Code