Commit f7863a3c authored by Maurice Hendrix's avatar Maurice Hendrix
Browse files

now uses log_base_path option. If not set, logfile and logpath work as previously

parent bdb6cedf
...@@ -120,6 +120,7 @@ sub parse_common_options { ...@@ -120,6 +120,7 @@ sub parse_common_options {
'logfile|log=s', 'logfile|log=s',
'nolog|nolog=s', 'nolog|nolog=s',
'logpath=s', 'logpath=s',
'log_base_path=s'
'logappend|log_append=s', 'logappend|log_append=s',
'verbose|v=s', 'verbose|v=s',
'interactive|i=s', 'interactive|i=s',
...@@ -160,18 +161,19 @@ sub parse_common_options { ...@@ -160,18 +161,19 @@ sub parse_common_options {
map { $self->param($_, $h{$_}) } keys %h; map { $self->param($_, $h{$_}) } keys %h;
# if logpath & logfile are not se, set them here to /ensemblweb/vega_dev/shared/logs/conversion/DBNAME/SCRIPNAME_NN.log # if logpath & logfile are not se, set them here to /ensemblweb/vega_dev/shared/logs/conversion/DBNAME/SCRIPNAME_NN.log
if (not (defined($self->param('logpath')))){ if (defined($self->param('log_base_path'))) {
$self->param('logpath', "/ensemblweb/vega_dev/shared/logs/conversion/".$self->param('dbname')."/" ); if (not (defined($self->param('logpath')))){
$self->param('logpath', "/ensemblweb/vega_dev/shared/logs/conversion/".$self->param('dbname')."/" );
}
if ( (not defined $self->param('logfile') ) && (not defined $self->param('nolog') ) ){
my $log = $Script;
$log =~ s/.pl//g;
my $counter;
for ($counter=1 ; (-e $self->param('logpath')."/".$log."_".sprintf("%03d", $counter).".log"); $counter++){ warn $self->param('logpath')."/".$log."_".$counter.".log";}
$self->param('logfile', $log."_".sprintf("%03d", $counter).".log");
}
} }
if ( (not defined $self->param('logfile') ) && (not defined $self->param('nolog') ) ){
my $log = $Script;
$log =~ s/.pl//g;
my $counter;
for ($counter=1 ; (-e $self->param('logpath')."/".$log."_".sprintf("%03d", $counter).".log"); $counter++){ warn $self->param('logpath')."/".$log."_".$counter.".log";}
$self->param('logfile', $log."_".sprintf("%03d", $counter).".log");
}
return(1); return(1);
} }
......
Markdown is supported
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