2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-01-31 12:49:34 +00:00

fhem.pl: add mkdir to OpenLogfile (Forum #122913)

git-svn-id: https://svn.fhem.de/fhem/trunk@24968 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
rudolfkoenig 2021-09-13 16:16:52 +00:00
parent 5e4b944232
commit e015e0aaa5

View File

@ -1437,6 +1437,7 @@ OpenLogfile($)
$defs{global}{currentlogfile} = $param;
$defs{global}{logfile} = $attr{global}{logfile};
restoreDir_mkDir($currlogfile=~m,^/,? "":".", $currlogfile, 1);
open(LOG, ">>$currlogfile") || return("Can't open $currlogfile: $!");
redirectStdinStdErr();