#Load module in different environments
2 messages · Page 1 of 1 (latest)
Changing modules by config is not something that's commonly support by Nest, more often it's easier to modify the config of the module than the module itself. If you were using Nx you could have a logger.module.ts that imports your dev logger and a logger.module.prod.ts that imports pino and have them swap the files on production build, but otherwise I think you'd need a custom webpack config for that. Is it just pino's JSON format, because you can pretty-print that. Other there are other loggers like Ogma that have json and string formats available