New release is coming soon! If you want to try out the latest features, simply run npm i -s moleculer@next. The docs for the latest version are available here.
// moleculer.config.js module.exports = { logger: { type: "Console", options: { // Logging level level: "info", // Using colors on the output colors: true, // Print module names with different colors (like docker-compose for containers) moduleColors: false, // Line formatter. It can be "json", "short", "simple", "full", a `Function` or a template string like "{timestamp} {level} {nodeID}/{mod}: {msg}" formatter: "full", // Custom object printer. If not defined, it uses the `util.inspect` method. objectPrinter: null, // Auto-padding the module name in order to messages begin at the same column. autoPadding: false } } };
// moleculer.config.js module.exports = { logger: { type: "File", options: { // Logging level level: "info", // Folder path to save files. You can use {nodeID} & {namespace} variables. folder: "./logs", // Filename template. You can use {date}, {nodeID} & {namespace} variables. filename: "moleculer-{date}.log", // Line formatter. It can be "json", "short", "simple", "full", a `Function` or a template string like "{timestamp} {level} {nodeID}/{mod}: {msg}" formatter: "json", // Custom object printer. If not defined, it uses the `util.inspect` method. objectPrinter: null, // End of line. Default values comes from the OS settings. eol: "\n", // File appending interval in milliseconds. interval: 1 * 1000 } } };