truncating long log lines that go to syslog, as it kills the perl sprintf for some...
authormiker <miker@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Wed, 14 Dec 2005 06:01:14 +0000 (06:01 +0000)
committermiker <miker@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Wed, 14 Dec 2005 06:01:14 +0000 (06:01 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/trunk@2366 dcc99617-32d9-48b4-a31d-7c20da2025e4

OpenSRF/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); }
        }
 }