Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix:Fix putLogs API validation does not support LogTags field #212

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant