mirror of
https://gitlab.com/shorewall/code.git
synced 2024-12-23 06:38:53 +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.
|
||||
#
|
||||
|
||||
sub mesg
|
||||
{
|
||||
my $type = shift;
|
||||
print STDERR "$0: $type - @_\n";
|
||||
}
|
||||
|
||||
sub error
|
||||
{
|
||||
mesg "ERROR", @_;
|
||||
}
|
||||
|
||||
sub warning
|
||||
{
|
||||
print STDERR "$0: WARNING - @_\n";
|
||||
mesg "WARNING", @_;
|
||||
}
|
||||
|
||||
sub fatal
|
||||
{
|
||||
my $RET = shift;
|
||||
print STDERR "$0: FATAL - @_\n";
|
||||
mesg "FATAL", @_;
|
||||
exit $RET;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user