s/logline/printlog/g
This commit is contained in:
parent
d91e8c09b6
commit
f81996e6ac
1 changed files with 5 additions and 5 deletions
10
revbank
10
revbank
|
@ -21,7 +21,7 @@ $SIG{INT} = 'IGNORE';
|
||||||
|
|
||||||
# Likewise, things might go wrong if you run multiple instances of revbank...
|
# Likewise, things might go wrong if you run multiple instances of revbank...
|
||||||
|
|
||||||
sub logline {
|
sub printlog {
|
||||||
open my $fh, ">>.revbank.log";
|
open my $fh, ">>.revbank.log";
|
||||||
my $x = join "", @_;
|
my $x = join "", @_;
|
||||||
$x =~ s/\n/POSIX::strftime("\n%Y%m%d%H%M%S ", localtime)/ge;
|
$x =~ s/\n/POSIX::strftime("\n%Y%m%d%H%M%S ", localtime)/ge;
|
||||||
|
@ -36,7 +36,7 @@ sub logline {
|
||||||
shift;
|
shift;
|
||||||
local $| = 1;
|
local $| = 1;
|
||||||
print {*STDOUT} @_;
|
print {*STDOUT} @_;
|
||||||
main::logline(@_);
|
main::printlog(@_);
|
||||||
}
|
}
|
||||||
sub PRINTF {
|
sub PRINTF {
|
||||||
shift->PRINT(sprintf(shift, @_));
|
shift->PRINT(sprintf(shift, @_));
|
||||||
|
@ -70,9 +70,9 @@ sub prompt {
|
||||||
};
|
};
|
||||||
my $input = $readline->readline($prompt);
|
my $input = $readline->readline($prompt);
|
||||||
|
|
||||||
logline($prompt);
|
printlog($prompt);
|
||||||
logline(defined($input) ? $input : "\e[1;5mX\e[0m");
|
printlog(defined($input) ? $input : "\e[1;5mX\e[0m");
|
||||||
logline("\n");
|
printlog("\n");
|
||||||
|
|
||||||
print "\e[0m";
|
print "\e[0m";
|
||||||
defined $input or return;
|
defined $input or return;
|
||||||
|
|
Loading…
Add table
Reference in a new issue