Skip to content
Snippets Groups Projects
Commit 3e4d08ba authored by Patrick Meidl's avatar Patrick Meidl
Browse files

create log dir if not exists

parent 214bbcae
No related branches found
No related tags found
No related merge requests found
......@@ -1198,6 +1198,10 @@ sub log_filehandle {
my $fh = \*STDERR;
if (my $logfile = $self->param('logfile')) {
if (my $logpath = $self->param('logpath')) {
unless (-e $logpath) {
system("mkdir $logpath") == 0 or
$self->log_error("Can't create log dir $logpath: $!\n");
}
$logfile = "$logpath/$logfile";
}
open($fh, "$mode", $logfile) or throw(
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment