Skip to content

Commit

Permalink
cleaner log
Browse files Browse the repository at this point in the history
  • Loading branch information
Pombert-JF committed Apr 24, 2024
1 parent 5134c7b commit 8c3714f
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions run_syny.pl
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# Pombert lab, 2022

my $name = 'run_syny.pl';
my $version = '0.6.2';
my $version = '0.6.2a';
my $updated = '2024-04-24';

use strict;
Expand Down Expand Up @@ -341,6 +341,7 @@
open ERROR, '>', $log_err or die "Can't create $log_err: $!\n";

my $time = localtime();
my $start_time = time();
my $tstart = time();

print LOG "SYNY started on: ".$time."\n";
Expand Down Expand Up @@ -1125,7 +1126,7 @@
###################################################################################################

my $end_time = localtime();
my $run_time = time - $tstart;
my $run_time = time - $start_time;

print LOG "\n";
print LOG "SYNY completed on: ".$end_time."\n";
Expand Down Expand Up @@ -1164,11 +1165,17 @@ sub logs {

my $fh = $_[0];
my $analysis = $_[1];
my $len = length($analysis);
my $pad = 40 - $len;
my $spacer = ' ' x $pad;

my $run_time = time - $tstart;
my $mend = localtime();
my $tlen = length($run_time);
my $tpad = 6 - $tlen;
my $tspacer = ' ' x $tpad;

print $fh "$analysis:\t$run_time seconds;\tcompleted on $mend\n";
print $fh "$analysis:".$spacer.$tspacer."$run_time seconds; completed on $mend\n";

}

Expand Down

0 comments on commit 8c3714f

Please sign in to comment.