Skip to content

Conversation

@mind029
Copy link

@mind029 mind029 commented Feb 17, 2022

Fix sls.putLogs API validation does not support LogTags field

@goto100 @daxingplay @JacksonTian @chylvina @aleelock @mayunlei

 const param = { projectName, logStoreName: logstoreName, logGroup: { // 必选,写入的日志数据。 logs: [ { time: Math.floor(new Date().getTime() / 1000), contents: [ { key: 'a1', value: '1' }, { key: 'a2', value: '2' }, { key: 'a3', value: '3' }, ], }, ], topic: 'vv', source: '127.0.0.1', // 本身api 支持,api input 检验没更新 LogTags: [ { Key: 'nick12', Value: 'mind', }, ], }, }; sls.putLogs(param, (err, data) => { if (err) { console.error('error:', err); } else { console.log('写入日志成功', data); } });
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

1 participant