Adding LogLevel support

This commit is contained in:
Fabian
2019-07-13 12:10:20 +02:00
parent ca41468dc1
commit cc5fc5ae08
5 changed files with 138 additions and 112 deletions

View File

@ -1,4 +1,5 @@
import { Logging, LoggingBase } from ".";
import { LoggingTypes } from "./types";
Logging.log("test")
Logging.log("i", "am", { a: "an" }, 1000);
@ -28,4 +29,15 @@ cus2.log("Hello from custom Logger 2")
cus22.log("Hello from custom Logger 22")
cus2.log("Hello from custom Logger 2")
cus22.log("Hello from custom Logger 22")
cus2.log("Hello from custom Logger 2")
cus2.log("Hello from custom Logger 2")
Logging.debug("Only Errors should appear:")
Logging.logLevel = LoggingTypes.Error;
Logging.debug("This should not be there 1");
Logging.log("This should not be there 2");
Logging.warn("This should not be there 3");
Logging.warning("This should not be there 4");
Logging.error("This should be there 1");
Logging.errorMessage("This should be there 2");