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

Log fix #109

Open
wants to merge 5 commits into
base: develop
Choose a base branch
from
Open

Log fix #109

wants to merge 5 commits into from

Conversation

okhaimie-dev
Copy link
Member

Took out the logDNA.

Copy link

@ephemeralrogue ephemeralrogue left a comment

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.

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
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.

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
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.

flush(): void {
logger.flush();
},
};

export const LogUtils = {
logCommandStart(ctx: CommandContext): void {
Log.info(`/${ctx.commandName} ran ${ctx.user.username}#${ctx.user.discriminator}`, {
indexMeta: true,
meta: {

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
Copy link
Collaborator

@LordRanchoatos LordRanchoatos left a comment

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