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

Have the logs use the error annotation format #60

Open
jamie-wearsafe opened this issue May 15, 2021 · 5 comments
Open

Have the logs use the error annotation format #60

jamie-wearsafe opened this issue May 15, 2021 · 5 comments

Comments

@jamie-wearsafe
Copy link

core.info(`${path}:${line} | ${message.replace(/\n/g, ' ')}`);

If we use the issueCommand() function it will create error annotations in the action as well, which is also handy for accessing the problem.

core.issueCommand('error', {file: path,line:line}, `${message.replace(/\n/g, ' ')}`);
@jmisur
Copy link
Contributor

jmisur commented May 26, 2021

Hey @jamie-wearsafe. I'm not really sure how does that work or what would it improve? Can you elaborate more on this?

@jamie-wearsafe
Copy link
Author

Hey @jamie-wearsafe. I'm not really sure how does that work or what would it improve? Can you elaborate more on this?

When using that annotation the error logs create links to the file and line number in the src.
This way at the end of the job workflow, the items that are brought up in the report are also available as error annotations in the workflow.

@jmisur
Copy link
Contributor

jmisur commented Jun 7, 2021

I'm unable to find such functionality in javascript core library though.

@jamie-wearsafe
Copy link
Author

@jmisur
Copy link
Contributor

jmisur commented Aug 17, 2021

It's intended for internal use. I'd rather stick to official API.

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 a pull request may close this issue.

3 participants
@jmisur @jamie-wearsafe and others