Skip to content

Log fix#109

Open
okhaimie-dev wants to merge 5 commits into
developfrom
log-fix
Open

Log fix#109
okhaimie-dev wants to merge 5 commits into
developfrom
log-fix

Conversation

@okhaimie-dev

Copy link
Copy Markdown
Member

Took out the logDNA.

@okhaimie-dev okhaimie-dev requested a review from lvnacy as a code owner March 15, 2023 05:11
Comment thread src/app/service/guest-pass/GuestPassService.ts

@lvnacy lvnacy left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Left a few comments with regard to the data captured in the various meta objects. Open to discussing potential solutions for these.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Regarding the rateLimit, can we include the rateLimitData.timeout, rateLimitData.limit, rateLimitData.method, rateLimitData.path, rateLimitData.route, and rateLimitData.global details in the error object that gets returned?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Alright. I will look at how we can implement pino's mixin() function for this.

Comment thread src/app/service/constants/apiKeys.ts

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Same as in RateLimit.ts, can we create an object to include the discordId, duration, isActive, and description details in the error object that is returned? Perhaps we extend the Error object to capture this data and serve it when called, as a custom error log option, ie Log.timecardData.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Yes we can definitely do this, will start working on this.

Comment thread src/app/utils/Log.ts
Comment thread src/app/utils/Log.ts
logCommandStart(ctx: CommandContext): void {
Log.info(`/${ctx.commandName} ran ${ctx.user.username}#${ctx.user.discriminator}`, {
indexMeta: true,
meta: {

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Same as above for RateLimit.ts and Checkout.ts. Since we're in the process of updating some of the log captures, might as well solve this now.

LordRanchoatos
LordRanchoatos previously approved these changes Mar 15, 2023

@LordRanchoatos LordRanchoatos left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

This gets us going with the logger, we will still need to capture the meta data left out while implementing this.

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.

3 participants