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

feat(gstd): stabilize program logs #4072

Closed
wants to merge 9 commits into from
Closed

feat(gstd): stabilize program logs #4072

wants to merge 9 commits into from

Conversation

clearloop
Copy link
Contributor

@clearloop clearloop commented Jul 21, 2024

Resolves # .

Different from gstd::debug!, developers may have log requirements while building programs in production, e.g. using an indexer to fetch the historical events.

since our pallet haven't had an event just for program logging atm (this is also an option), the current implementation could be sending messages to another program, this PR uses Actor::zero as a logger program

@gear-tech/dev

@clearloop clearloop added the A0-pleasereview PR is ready to be reviewed by the team label Jul 21, 2024
Copy link
Member

@breathx breathx left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Similar approach is used in sails for a while.
I'm super against of macros here, so if you really want such functionality to be a part of gstd, I'd go with just gstd::msg::emit/emit_bytes(..) that recalls send with 0 value and 0 destination

@DennisInSky wdyt?

@breathx
Copy link
Member

breathx commented Aug 22, 2024

Also there's no actually need in testing this

@clearloop
Copy link
Contributor Author

clearloop commented Aug 22, 2024

closing this since these kind of implementations could be added to sails dynamically

@clearloop clearloop closed this Aug 22, 2024
@clearloop clearloop deleted the cl/log branch August 22, 2024 13:33
@clearloop clearloop restored the cl/log branch August 22, 2024 14:13
@clearloop clearloop deleted the cl/log branch September 28, 2024 18:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A0-pleasereview PR is ready to be reviewed by the team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants