Closed FoxxMD closed 9 months ago
Question though...would it be acceptable to extend this functionality to customPrettifiers
so that colors can be accessed from essentially all functions for customizing output?
EDIT: A combined branch example of providing colors to all prettifiers -- see usage under customPrettifiers section in readme https://github.com/FoxxMD/pino-pretty/tree/additionalFunctionality?tab=readme-ov-file#options
Enables users to use available colors based on
colorize
context of the pino-pretty instance.Currently if a user wants to color their messages they need to create their own instances of Colorette and implement logic, outside of pino-pretty, to make sure the
useColors
option passed matches what was given to pino-pretty ascolorize
. However pino-pretty already has this object available...this PR extendsmessageFormat
to add the existing Colorette instance as a fourth parameter so that the user doesn't need to do that extra work.