Name

Message — write custom message to console and Interchange log

SYNOPSIS

[-n] [-i] message

DESCRIPTION

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.

DIRECTIVE TYPE AND DEFAULT VALUE

Global directive,
Catalog directive

EXAMPLES

Example: Specifying Message

Message -n Test message


NOTES

AVAILABILITY

Message is available in Interchange versions:

4.6.0-5.9.0 (git-head)

SOURCE

Interchange 5.9.0:

Source: lib/Vend/Config.pm
Line 399

['Message',          'message',           ''],

Source: lib/Vend/Config.pm
Line 551

['Message',          'message',           ''],

Source: lib/Vend/Config.pm
Line 2950 (context shows lines 2950-2983)

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,
      )
  );
}
}

AUTHORS

Interchange Development Group

SEE ALSO

log(7ic)

DocBook! Interchange!