Message — write custom message to console and Interchange log
This configuration directive displays a specified message on the console and in the Interchange log.
If the "option" -n
is present, Interchange strips leading and
trailing whitespace before display. If -i
is present
and Interchange is running in the foreground (that is, without detaching from the
controlling terminal), then the message is only output to the console,
avoiding the log.
Interchange 5.9.0:
Source: lib/Vend/Config.pm
Line 2957 (context shows lines 2957-2990)
sub parse_message { my($name, $val) = @_; return '' unless $val; return 1 if $Vend::Quiet; my $strip; my $info_only; ## strip trailing whitespace if -n beins message while($val =~ s/^-([ni])\s+//) { $1 eq 'n' and $val =~ s/^-n\s+// and $strip = 1 and $val =~ s/\s+$//; $info_only = 1 if $1 eq 'i'; } my $msg = errmsg($val, $name, $., $configfile, ); if($info_only and $Global::Foreground) { print $msg; } else { logGlobal({level => 'info', strip => $strip }, errmsg($val, $name, $., $configfile, ) ); } }