Compare commits

..

No commits in common. "84ddf1c021c7a50835490339940452f0c51df75d" and "3091d6b3f46c2a576dc2adcc39acf84961d7a537" have entirely different histories.

View File

@ -1,5 +1,5 @@
@lazy @lazy
function logger(type, caller, message, body) { function logger(type, caller, message) {
$tmp_logger = false; $tmp_logger = false;
$tmp_type = $type; $tmp_type = $type;
if ($temp_type > 6 || $temp_type < 1) { if ($temp_type > 6 || $temp_type < 1) {
@ -20,11 +20,6 @@ function logger(type, caller, message, body) {
default: default:
return 0; return 0;
} }
$isBody = $body;
if ($isBody) {
return;
}
tellraw @a $body;
} }
class logger { class logger {
@ -46,7 +41,7 @@ class logger {
$logger = false; $logger = false;
} else if ($logger) { } else if ($logger) {
say "Debug logging is enabled. You should now see a test log message:"; say "Debug logging is enabled. You should now see a test log message:";
logger(2, logger, "This is a test. Logging appears to be working as expected!", false); logger(2, logger, "This is a test. Logging appears to be working as expected!");
} else { } else {
say "This is not a log message. There appears to be something wrong with the logger. It has not been detected as `!true` or `true`. Please investigate."; say "This is not a log message. There appears to be something wrong with the logger. It has not been detected as `!true` or `true`. Please investigate.";
} }
@ -73,23 +68,23 @@ class logger {
} }
function test_fatal() { function test_fatal() {
logger(5, logger, "This is a test", false); logger(5, logger, "This is a test");
} }
function test_error() { function test_error() {
logger(4, logger, "This is a test", false); logger(4, logger, "This is a test");
} }
function test_warning() { function test_warning() {
logger(3, logger, "This is a test", false); logger(3, logger, "This is a test");
} }
function test_info() { function test_info() {
logger(2, logger, "This is a test", false); logger(2, logger, "This is a test");
} }
function test_debug() { function test_debug() {
logger(1, logger, "This is a test", false); logger(1, logger, "This is a test");
} }
} }