Namespace: Logging:xlog

Logging:xlog

Source:

Methods

xlog(messageopt, nullable)

X marks the spot. A very simple method for urgent cases of printf-debugging. Simply logs the context of the call to the console, also providing a counter, counting the executions from that context.

For real detailed debugging, you have to instantiate/throw an error and work with that information, this is just for quick checking.

This method uses Error.stack, which is a rather wonky and unstable feature feature. Use this for debugging and better remove it again afterwards. For more info on Error.stack, read: https://developer.mozilla.org/de/docs/Web/JavaScript/Reference/Global_Objects/Error/Stack

Parameters:
Name Type Attributes Default Description
message String <optional>
<nullable>
null

an optional message to be printed besides the context information

Source:
Example
for( let i = 0; i < 10; i++ ){
  xlog('purely optional message');
}