Adding custom colored logging
This commit is contained in:
@ -1,4 +1,4 @@
|
||||
import { Logging, LoggingBase } from ".";
|
||||
import { Logging, LoggingBase, Colors, withColor } from ".";
|
||||
|
||||
Logging.log("test")
|
||||
Logging.log("i", "am", { a: "an" }, 1000);
|
||||
@ -8,6 +8,9 @@ Logging.errorMessage("i", "am", "an", "error");
|
||||
|
||||
Logging.log("\x1b[31m\x1b[31m\x1b[31m\x1b[31m\x1b[31m\x1b[31m TEST \x1b[31m\x1b[31m\x1b[31m")
|
||||
|
||||
Logging.log(withColor(Colors.MAGENTA, "This text should be magenta!"), "This not!")
|
||||
Logging.log(withColor(Colors.MAGENTA, { somekey: "Some value" }))
|
||||
|
||||
let err = new Error()
|
||||
if (typeof err.stack !== "string") console.log("Stacktrace invalid", err.stack)
|
||||
|
||||
|
Reference in New Issue
Block a user