X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=SL%2FLXDebug.pm;h=c0983aa0968252c2a5f65c89a8be3a39dd5fad76;hb=f869a45a1b3ff7c92a4b54f387ab12436e18e4b0;hp=cf6c91266f4977beaa627c9fa8ad79710ced9e37;hpb=313c7c4d7422770b3f28ce0b5d51f867472e1fce;p=kivitendo-erp.git diff --git a/SL/LXDebug.pm b/SL/LXDebug.pm index cf6c91266..c0983aa09 100644 --- a/SL/LXDebug.pm +++ b/SL/LXDebug.pm @@ -18,7 +18,7 @@ use constant FILE_TARGET => 0; use constant STDERR_TARGET => 1; use Data::Dumper; -use POSIX qw(strftime getppid); +use POSIX qw(strftime getpid); use Time::HiRes qw(gettimeofday tv_interval); use YAML; use SL::Request (); @@ -262,7 +262,7 @@ sub _write { no warnings; my ($self, $prefix, $message) = @_; my @now = gettimeofday(); - my $date = strftime("%Y-%m-%d %H:%M:%S." . sprintf('%03d', int($now[1] / 1000)) . " $$ [" . getppid() . "] ${prefix}: ", localtime($now[0])); + my $date = strftime("%Y-%m-%d %H:%M:%S." . sprintf('%03d', int($now[1] / 1000)) . " $$ [" . getpid() . "] ${prefix}: ", localtime($now[0])); local *FILE; chomp($message); @@ -274,6 +274,7 @@ sub _write_raw { local *FILE; if ((FILE_TARGET == $self->{"target"}) && open(FILE, ">>", $self->{"file"})) { + binmode FILE, ":utf8"; print FILE $message; close FILE;