truncating long log lines that go to syslog, as it kills the perl sprintf for some...
authormiker <miker@9efc2488-bf62-4759-914b-345cdb29e865>
Wed, 14 Dec 2005 06:01:14 +0000 (06:01 +0000)
committermiker <miker@9efc2488-bf62-4759-914b-345cdb29e865>
Wed, 14 Dec 2005 06:01:14 +0000 (06:01 +0000)
git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@613 9efc2488-bf62-4759-914b-345cdb29e865

src/perlmods/OpenSRF/Utils/Logger.pm

index b4fe88d..f2a3ab7 100644 (file)
@@ -203,11 +203,11 @@ sub _log_message {
        $msg = "[$n:"."$$".":::] $msg";
 
        if( $level == ACTIVITY() ) {
-               if( is_act_syslog() ) { syslog( $fac | $l, $msg ); } 
+               if( is_act_syslog() ) { syslog( $fac | $l, substr($msg,0,100) ); } 
                elsif( is_act_filelog() ) { _write_file( $msg, 1 ); }
 
        } else {
-               if( is_syslog() ) { syslog( $fac | $l, $msg ); }
+               if( is_syslog() ) { syslog( $fac | $l, substr($msg,0,100) ); }
                elsif( is_filelog() ) { _write_file($msg); }
        }
 }