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:
parent
f0cb118c88
commit
449a8f7fe9
@ -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.
|
||||
*
|
||||
|
Loading…
Reference in New Issue
Block a user