-
Notifications
You must be signed in to change notification settings - Fork 710
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
Add log metadata plugin #865
Add log metadata plugin #865
Conversation
Forgot to add reviewers, labels etc and now I can't edit them, please help! 🤦 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @tomasvidhall thanks for putting this together — looks good!
There are quite a few comments in this review, so apologies if it’s a little confusing. Please ask if anything is unclear.
Basically what I’m suggesting is
-
Move
metadata
out ofaction.payload
and into the top-level log entry itself. -
Some minor tweaks to the plugin API/data.
I think the rest is mainly Typescript advice.
Thanks for the great review @delucis. I've updated the PR with the suggested changes. Feel free to give me more feedback. |
Changes look good @tomasvidhall! Will run a few local tests when I’m back at my computer, but I think this looks ready to merge. |
Tries to solve the second task in #227
I read up on how it used to work in #267 and tried to recreate something similar to that.
Added a Log metadata plugin which can be reached using
ctx.log.setMetadata()
and sets the payload as metadata on the addedLogEntry
.I a bit unsure about the naming of
metadata
, depends what you feel the terminology should be. I tried to find any mismatches and the closest I got was that there is something called action metadata for the bots, but it shouldn't collide from what I could see.I don't usually write Typescript or Svelte, so if I missed something please point it out and I'll fix it. 🚀
Checklist
master
).