From 7690b9fe33f4f1005b8b7d4d07068838998e9fe3 Mon Sep 17 00:00:00 2001 From: miker Date: Wed, 14 Dec 2005 06:01:14 +0000 Subject: [PATCH] truncating long log lines that go to syslog, as it kills the perl sprintf for some reason... git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@613 9efc2488-bf62-4759-914b-345cdb29e865 --- src/perlmods/OpenSRF/Utils/Logger.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/perlmods/OpenSRF/Utils/Logger.pm b/src/perlmods/OpenSRF/Utils/Logger.pm index b4fe88d..f2a3ab7 100644 --- a/src/perlmods/OpenSRF/Utils/Logger.pm +++ b/src/perlmods/OpenSRF/Utils/Logger.pm @@ -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); } } } -- 2.11.0