1
mirror of https://github.com/thepeacockproject/Peacock synced 2025-02-16 16:34:28 +01:00

Added logDebug for ease of debugging

This commit is contained in:
Lennard Fonteijn 2022-11-19 22:01:30 +01:00 committed by Lennard Fonteijn
parent f0cb118c88
commit 449a8f7fe9

View File

@ -64,6 +64,15 @@ const isDebug = ["*", "true", "peacock", "yes"].includes(
const zeroPad = (num: string | number, places: number) =>
String(num).padStart(places, "0")
/**
* Outputs all given arguments as a debug level indented JSON-message to the console.
*
* @param args The values to log.
*/
export function logDebug(...args: unknown[]): void {
log(LogLevel.DEBUG, JSON.stringify(args, undefined, " "))
}
/**
* Outputs a log message to the console.
*