mirror of
https://github.com/pragma-/pbot.git
synced 2025-01-11 12:32:37 +01:00
Strip control characters from log messages
This commit is contained in:
parent
678d82676d
commit
5cd0f85e65
@ -36,6 +36,8 @@ sub log {
|
||||
my ($self, $text) = @_;
|
||||
my $time = localtime;
|
||||
|
||||
$text =~ s/(?:[\01-\010]|[\016-\037])/^/g;
|
||||
|
||||
if(defined $self->{log_file}) {
|
||||
print PLOG_FILE "$time :: $text";
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user