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

Emit tags in LOG and LOGD #5953

Closed
Tracked by #5951
IGI-111 opened this issue May 2, 2024 · 0 comments · Fixed by #5980
Closed
Tracked by #5951

Emit tags in LOG and LOGD #5953

IGI-111 opened this issue May 2, 2024 · 0 comments · Fixed by #5980
Assignees
Labels
compiler General compiler. Should eventually become more specific as the issue is triaged logging Related to logging (tracing, stdout, stderr, log-files)

Comments

@IGI-111
Copy link
Contributor

IGI-111 commented May 2, 2024

Emit 64 bit hashes of the event types as defined in #5952 in LOG and LOGD receipts.

@IGI-111 IGI-111 added compiler General compiler. Should eventually become more specific as the issue is triaged logging Related to logging (tracing, stdout, stderr, log-files) labels May 2, 2024
IGI-111 added a commit that referenced this issue May 17, 2024
## Description

Changes LogId to contain hash based on abi str.

```
    __log(1u32);         // hashed: "u32"
    __log((1u32, 1u64)); // hashed: "(u32, u64)"
    __log([0u64]);       // hashed: "[u64; 1]"
    __log(Some(0u64));   // hashed: "enum std::option::Option<u64>"
    __log(SS{
        ss: 1u64
    });                  // hashed: "struct SS<u64>"
```

Adds abi_hash_ids flag to command line tools.

Closes #5953

## Checklist

- [x] I have linked to any relevant issues.
- [x] I have commented my code, particularly in hard-to-understand
areas.
- [ ] I have updated the documentation where relevant (API docs, the
reference, and the Sway book).
- [ ] If my change requires substantial documentation changes, I have
[requested support from the DevRel
team](https://github.com/FuelLabs/devrel-requests/issues/new/choose)
- [x] I have added tests that prove my fix is effective or that my
feature works.
- [x] I have added (or requested a maintainer to add) the necessary
`Breaking*` or `New Feature` labels where relevant.
- [x] I have done my best to ensure that my PR adheres to [the Fuel Labs
Code Review
Standards](https://github.com/FuelLabs/rfcs/blob/master/text/code-standards/external-contributors.md).
- [x] I have requested a review from the relevant team or maintainers.

---------

Co-authored-by: Kaya Gökalp <kaya.gokalp@fuel.sh>
Co-authored-by: Kaya Gokalp <kayagokalp123@gmail.com>
Co-authored-by: IGI-111 <igi-111@protonmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
compiler General compiler. Should eventually become more specific as the issue is triaged logging Related to logging (tracing, stdout, stderr, log-files)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants