depot/packages/dream2nix-overrides/nodejs/uptime-kuma/log-in-data-dir.patch

14 lines
412 B
Diff
Raw Normal View History

diff --git a/server/util-server.js b/server/util-server.js
index 39a2d90..ecb404a 100644
--- a/server/util-server.js
+++ b/server/util-server.js
@@ -528,7 +528,7 @@ exports.convertToUTF8 = (body) => {
let logFile;
try {
- logFile = fs.createWriteStream("./data/error.log", {
+ logFile = fs.createWriteStream((process.env.DATA_DIR || ".") + "/error.log", {
flags: "a"
});
} catch (_) { }