mirror of
https://gitlab.com/shorewall/code.git
synced 2025-01-11 08:08:12 +01:00
Fix date formatting in log
git-svn-id: https://shorewall.svn.sourceforge.net/svnroot/shorewall/trunk@7813 fbd18981-670d-0410-9b5c-8dc0c1a9a2bb
This commit is contained in:
parent
b7c130b10b
commit
2be90a9672
@ -439,7 +439,7 @@ sub warning_message
|
||||
|
||||
if ( $log ) {
|
||||
@localtime = localtime;
|
||||
printf $log '%s %02d %02d:%02d:%02d ', $abbr[$localtime[4]], @localtime[3,2,1,0];
|
||||
printf $log '%s %2d %02d:%02d:%02d ', $abbr[$localtime[4]], @localtime[3,2,1,0];
|
||||
}
|
||||
|
||||
if ( $debug ) {
|
||||
@ -464,7 +464,7 @@ sub fatal_error {
|
||||
|
||||
if ( $log ) {
|
||||
our @localtime = localtime;
|
||||
printf $log '%s %02d %02d:%02d:%02d ', $abbr[$localtime[4]], @localtime[3,2,1,0];
|
||||
printf $log '%s %2d %02d:%02d:%02d ', $abbr[$localtime[4]], @localtime[3,2,1,0];
|
||||
|
||||
if ( $debug ) {
|
||||
print $log longmess( " ERROR: @_$currentlineinfo\n" );
|
||||
@ -485,7 +485,7 @@ sub fatal_error1 {
|
||||
|
||||
if ( $log ) {
|
||||
our @localtime = localtime;
|
||||
printf $log '%s %02d %02d:%02d:%02d ', $abbr[$localtime[4]], @localtime[3,2,1,0];
|
||||
printf $log '%s %2d %02d:%02d:%02d ', $abbr[$localtime[4]], @localtime[3,2,1,0];
|
||||
|
||||
if ( $debug ) {
|
||||
print $log longmess( " ERROR: @_\n" );
|
||||
@ -638,7 +638,7 @@ sub progress_message {
|
||||
|
||||
@localtime = localtime unless $havelocaltime;
|
||||
|
||||
printf $log '%s %02d %02d:%02d:%02d ', $abbr[$localtime[4]], @localtime[3,2,1,0];
|
||||
printf $log '%s %2d %2d:%02d:%02d ', $abbr[$localtime[4]], @localtime[3,2,1,0];
|
||||
my $line = "@_";
|
||||
$line =~ s/\s+/ /g;
|
||||
print $log "$line\n";
|
||||
@ -661,7 +661,7 @@ sub progress_message2 {
|
||||
|
||||
@localtime = localtime unless $havelocaltime;
|
||||
|
||||
printf $log '%s %02d %02d:%02d:%02d ', $abbr[$localtime[4]], @localtime[3,2,1,0];
|
||||
printf $log '%s %2d %02d:%02d:%02d ', $abbr[$localtime[4]], @localtime[3,2,1,0];
|
||||
print $log "@_\n";
|
||||
}
|
||||
}
|
||||
@ -682,7 +682,7 @@ sub progress_message3 {
|
||||
|
||||
@localtime = localtime unless $havelocaltime;
|
||||
|
||||
printf $log '%s %02d %02d:%02d:%02d ', $abbr[$localtime[4]], @localtime[3,2,1,0];
|
||||
printf $log '%s %2d %02d:%02d:%02d ', $abbr[$localtime[4]], @localtime[3,2,1,0];
|
||||
print $log "@_\n";
|
||||
}
|
||||
}
|
||||
|
@ -43,7 +43,7 @@ progress_message() # $* = Message
|
||||
fi
|
||||
|
||||
if [ $LOG_VERBOSE -gt 1 ]; then
|
||||
timestamp="$(date +'%_b %d %T') "
|
||||
timestamp="$(date +'%b %_d %T') "
|
||||
echo "${timestamp}$@" >> $STARTUP_LOG
|
||||
fi
|
||||
}
|
||||
@ -58,7 +58,7 @@ progress_message2() # $* = Message
|
||||
fi
|
||||
|
||||
if [ $LOG_VERBOSE -gt 0 ]; then
|
||||
timestamp="$(date +'%_b %d %T') "
|
||||
timestamp="$(date +'%b %_d %T') "
|
||||
echo "${timestamp}$@" >> $STARTUP_LOG
|
||||
fi
|
||||
}
|
||||
@ -73,7 +73,7 @@ progress_message3() # $* = Message
|
||||
fi
|
||||
|
||||
if [ $LOG_VERBOSE -ge 0 ]; then
|
||||
timestamp="$(date +'%_b %d %T') "
|
||||
timestamp="$(date +'%b %_d %T') "
|
||||
echo "${timestamp}$@" >> $STARTUP_LOG
|
||||
fi
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user