昇腾社区首页
中文
注册

DlogSetAttrForC

函数原型

int DlogSetAttrForC(LogAttr logAttrInfo);

函数功能

设置日志属性(C接口)。包含日志类型、进程id、device id等。

参数说明

参数

输入/输出

说明

logAttrInfo

输入

typedef struct {

ProcessType type; // process type

unsigned int pid; // pid

unsigned int deviceId; // device id

unsigned int mode; // log save mode

char reserved[48]; // reserve 48 bytes, align to 64 bytes

} LogAttr;

返回值

返回设置结果

0:成功
-1:失败

调用示例

LogAttr attr;
attr.type = APPLICATION;
attr.pid = 0;
attr.deviceId = 1;
attr.mode = LOG_SAVE_MODE_UNI;
int result = DlogSetAttrForC(attr);