@semiont/backend 0.3.6 → 0.3.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -110,11 +110,12 @@ function createTransports(config2) {
110
110
  }));
111
111
  }
112
112
  if (config2.transports.includes("file")) {
113
+ const logDir = process.env.LOG_DIR ?? "logs";
113
114
  transports.push(new winston.transports.File({
114
- filename: "logs/error.log",
115
+ filename: `${logDir}/error.log`,
115
116
  level: "error"
116
117
  }), new winston.transports.File({
117
- filename: "logs/combined.log",
118
+ filename: `${logDir}/combined.log`,
118
119
  level: config2.level
119
120
  }));
120
121
  }