mirror of
https://gitlab.com/shorewall/code.git
synced 2024-11-08 08:44:05 +01:00
Simple messaging improvement from current version
git-svn-id: https://shorewall.svn.sourceforge.net/svnroot/shorewall/trunk@4002 fbd18981-670d-0410-9b5c-8dc0c1a9a2bb
This commit is contained in:
parent
b7d2e8c684
commit
e78f354d5f
@ -49,15 +49,26 @@ my $dir = "$spool/$host";
|
|||||||
# usual perl 'die' or 'warn' functions.
|
# usual perl 'die' or 'warn' functions.
|
||||||
#
|
#
|
||||||
|
|
||||||
|
sub mesg
|
||||||
|
{
|
||||||
|
my $type = shift;
|
||||||
|
print STDERR "$0: $type - @_\n";
|
||||||
|
}
|
||||||
|
|
||||||
|
sub error
|
||||||
|
{
|
||||||
|
mesg "ERROR", @_;
|
||||||
|
}
|
||||||
|
|
||||||
sub warning
|
sub warning
|
||||||
{
|
{
|
||||||
print STDERR "$0: WARNING - @_\n";
|
mesg "WARNING", @_;
|
||||||
}
|
}
|
||||||
|
|
||||||
sub fatal
|
sub fatal
|
||||||
{
|
{
|
||||||
my $RET = shift;
|
my $RET = shift;
|
||||||
print STDERR "$0: FATAL - @_\n";
|
mesg "FATAL", @_;
|
||||||
exit $RET;
|
exit $RET;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user