<!-- 0 None, 1 Error, 2 Warning, 3 Info, 4 debug, 5 Internal (Nasty) -->
<loglevel>3</loglevel>
+ <!-- Maximum log message length; if using syslog, you might need to adjust
+ your syslog service's configuration to match longer message lengths -->
+ <loglength>1536</loglength>
+
<!-- config file for the services -->
<settings_config>SYSCONFDIR/opensrf.xml</settings_config>
my $act_syslog_enabled = 0; # is syslog enabled?
my $logfile_enabled = 1; # are we logging to a file?
my $act_logfile_enabled = 1; # are we logging to a file?
+my $max_log_msg_len = 1536; # SYSLOG default maximum is 2048
our $logger = "OpenSRF::Utils::Logger";
$loglevel = $config->bootstrap->loglevel;
+ if ($config->bootstrap->loglength) {
+ $max_log_msg_len = $config->bootstrap->loglength;
+ }
+
$logfile = $config->bootstrap->logfile;
if($logfile =~ /^syslog/) {
$syslog_enabled = 1;
$msg = "[$n:"."$$".":$file:$line_no:$osrf_xid] $msg";
- $msg = substr($msg, 0, 1536);
+ # Trim the message to the configured maximum log message length
+ $msg = substr($msg, 0, $max_log_msg_len);
if( $level == ACTIVITY() ) {
if( is_act_syslog() ) { syslog( $fac | $l, $msg ); }