-
Notifications
You must be signed in to change notification settings - Fork 6
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
base: develop
Are you sure you want to change the base?
Log fix #109
Conversation
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.
Left a few comments with regard to the data captured in the various meta
objects. Open to discussing potential solutions for these.
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.
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?
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.
Alright. I will look at how we can implement pino's mixin()
function for this.
src/app/service/timecard/Checkout.ts
Outdated
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.
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
.
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.
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: { |
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.
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.
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.
This gets us going with the logger, we will still need to capture the meta data left out while implementing this.
Took out the logDNA.