Oops, wrong file.

This commit is contained in:
Elijah Perrault committed 2011-01-16 23:41:08 -07:00
1 parent 87534d309f
commit 9c951f0d21
1 file changed
+20
+20
View File
@@ -87,4 +87,24 @@ sub trans
}
}
# Error subroutine.
sub err
{
my ($lvl, $msg) = @_;
# Check for an invalid level.
if ($lvl =~ m/[^0-9]/) {
return 0;
}
# Level 1: Print to screen.
if ($lvl => 1) {
API::Log::println("ERROR: $msg");
}
# Level 2: Log to file.
if ($lvl => 2) {
API::Log::alog("ERROR: $msg");
}
}
1;