Adding LogLevel support
This commit is contained in:
14
src/test.ts
14
src/test.ts
@ -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");
|
Reference in New Issue
Block a user