What I did after setting up NSSM and using the I/O and File Rotation features was a simple 2am cron-plus trigger and fs-ops nodes to scan for *.log files modified over older than 1 week & delete them.
[{"id":"c56719964f3478ec","type":"cronplus","z":"e532e271879e8af2","name":"2 am","outputField":"payload","timeZone":"","storeName":"","commandResponseMsgOutput":"output1","defaultLocation":"","defaultLocationType":"default","outputs":1,"options":[{"name":"2am","topic":"cleanup","payloadType":"str","payload":"c:/temp","expressionType":"cron","expression":"0 0 2 * * *","location":"","offset":"0","solarType":"all","solarEvents":"sunrise,sunset"}],"x":150,"y":140,"wires":[["31e557cd9528a4df"]]},{"id":"779a432bdf38d666","type":"fs-ops-dir","z":"e532e271879e8af2","name":"","path":"path","pathType":"msg","filter":"filter","filterType":"msg","dir":"files","dirType":"msg","x":600,"y":140,"wires":[["de0f6974f85ca50f"]]},{"id":"de0f6974f85ca50f","type":"fs-ops-stats","z":"e532e271879e8af2","name":"","path":"path","pathType":"msg","filename":"files","filenameType":"msg","stats":"stats","sizeType":"msg","x":740,"y":140,"wires":[["c8b79edc9e21b82a"]]},{"id":"31e557cd9528a4df","type":"change","z":"e532e271879e8af2","name":"Setup path and filter","rules":[{"t":"set","p":"path","pt":"msg","to":"c:/temp","tot":"str"},{"t":"set","p":"filter","pt":"msg","to":"*.txt","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":420,"y":140,"wires":[["779a432bdf38d666"]]},{"id":"c8b79edc9e21b82a","type":"function","z":"e532e271879e8af2","name":"get files modified more than 7 days ago","func":"const MAX_AGE_DAYS = 7\nconst MAX_AGE_MS = MAX_AGE_DAYS * 24 * 60 * 60 * 1000\nconst FILES = msg.files\nconst now = new Date()\nmsg.oldFiles = msg.stats.filter((stat, index)=> {\n stat.file = FILES[index]\n const modifiedTime = new Date(stat.mtime)\n stat.ageMs = now.valueOf() - modifiedTime.valueOf()\n if(stat.ageMs > MAX_AGE_MS) {\n return true\n }\n})\nmsg.filesToDelete = msg.oldFiles.map((stat) => stat.file)\nreturn msg;","outputs":1,"timeout":0,"noerr":0,"initialize":"","finalize":"","libs":[],"x":480,"y":200,"wires":[["76d525e420092f1b"]]},{"id":"76d525e420092f1b","type":"fs-ops-delete","z":"e532e271879e8af2","name":"","path":"path","pathType":"msg","filename":"filesToDelete","filenameType":"msg","x":750,"y":200,"wires":[[]]}]