🌲 Redwood Logging - Ideas?

Thanks @realStandal – This is a huge help and I very much appreciate it!

No - that’s definitely a bug / oversight on my part.

export const defaultLoggerOptions: LoggerOptions = {
  prettyPrint: isPretty && {
    colorize: true,
    ignore: 'hostname,pid',
    levelFirst: true,
    messageFormat: false,
    translateTime: true,
  },

I can see now how the others are getting lost.

I’ll address that. I may have to create a defaultPrettyOptions and then merge in overrides.

Note to me: See DefinitelyTyped/types/pino/index.d.ts at afdb4fac83531e27b6ba7a13e65e519b87bcaa30 · DefinitelyTyped/DefinitelyTyped · GitHub

I get those warnings too but had not yet figured out how to work around that … but now you’ve given me the answer or at least a direction! Thanks!

Interesting. I’ll look out for that as well. I had not seen that.

If you could, I’d appreciate it – that way I can make sure I don’t miss a step and also create tests for the prettyPrint overrides. Three separate ones would be best for me so I can make discrete PR/commits.

Glad it worked out for you.

Cheers!

Thanks for providing it @dthyresson!

I should add, this was me adding logging to an existing RW app, it was previously on version 0.27.2.

1 Like

Logger is now available in v0.28!

For the documentation see: Logging | RedwoodJS Docs

2 Likes