Open mousseq opened 1 year ago
There's a workaround for this, but it's ugly: You can create a subclass:
class CustomLogger extends BaseLogger<LoggerPayload> {
constructor(
settings?: ISettingsParam<LoggerPayload>,
logObj?: LoggerPayload,
) {
super(settings, logObj, 5);
}
override log(logLevelId: number, logLevelName: string, ...args: unknown[]) {
return {
logLevelId,
logLevelName,
...args,
} as any;
}
Return the payload as any
and it will get rid of the meta fields and only return what you decide to return in this function.
Nevermind, this just breaks the logger!
I would like to customize the pretty format and the json format in ways not currently supported.
const options = { name: "pretty", type: "pretty", prettyLogTemplate: pretty_log, stylePrettyLogs: false };
const plogger = new Logger( options );