feat/40-reroll-on-disinterest #54
@ -1,5 +1,8 @@
|
||||
import { createLogger, format, transports } from "winston"
|
||||
import { config } from "./configuration"
|
||||
import { v4 } from "uuid"
|
||||
export const newRequestId = v4()
|
||||
magnetotail marked this conversation as resolved
Outdated
|
||||
export const noGuildId = 'NoGuildId'
|
||||
|
||||
|
||||
const printFn = format.printf(({ guildId, level, message, errorCode, requestId, timestamp: logTimestamp }: { [k: string]: string }) => {
|
||||
|
Loading…
Reference in New Issue
Block a user
why?
This is a complete and total, boneheaded error :D
The intention was to present an more memorizable way to get a new uuid/v4.
Instead this just sets it once, making it useless.
It should be an exported function, returning the output of
v4()
and the callsite would beconst requestId = newRequestId()
This would prevent the
import { v4 as uuid } from "uuid"
orconst requestId = v4()
which, I think, are tedious or non-obvious.If you think this is a bad idea, I will gladly revert it though :)
I dont think it's bad tbh if we dont need the v4 as uuid import then. But I would also like an eventhandler framework where we would prevent usual boilerplate code like looking for guild Id or making a request id and put those base checks and things in a base class and just have handling code in a subclass. But that is quite hard as I learned