Devin Rhode
Devin Rhode
> I did a another try, I built a docker image with the bare minimum, and managed to get it working. Not sure what's different now. 😄 > https://github.com/atkinchris/next-logger/issues/13#issuecomment-1103960738 I...
If copying logger node_modules over manually becomes the long-term solution, we should absolutely remove `cosmiconfig` and just do a normal `require` of where we expect to find the users `next-logger.config.js`...
> I wonder if we could "trick" next.js into including our logger node_modules into standalone output. Maybe if next-logger.config.js was inside of src/ folder, and/or maybe if we imported it...
I'd take a "strict" approach: if we detect nextLogger.prefixes contains ansi escape codes (i.e. `nextLogger.prefixes.info !== "info - "`), just fail/crash. It's painful, but then the whole life of the...
Might look something like this: ```ts // next.config.js const { startNextLogger } = require('next-logger') startNextLogger({ customLogger: require('next-logger.config.js').logger, }) ``` The key here is that it feels less like a "framework"...
@karl-run You could actually try this out pretty easily: ```ts // next.config.js // 0. Directly check nextLogger.prefixes: const nextLogger = require('next/dist/build/output/log') if (nextLogger.prefixes.info !== "info - ") { console.warn('nextLogger.prefixes.info contains...
In my particular situation, azure applicationinsights likes to be loaded before _anything_ else, so it can monkey patch stuff. So in my particular situation, I would still want to do...
Best bet is to simply override console methods in your main next.config.js. Nothing fancy, at all. My fork isn't designed for this use case, but if you poke around, you...
I'm at a different company, not working with next.js anymore If you have the opportunity, Sentry has a server+client logging integration. This repo is only concerned with server side logging....
I've provided guidance above, you can use my fork for this.