Module INSPECT

Debug inspection facility

The INSPECT class provides a number of functions to ease development and debugging.

It mainly consists of an advanced print function that can represent complex data structures (Lua tables) and tag their encoding formats and size. Another spy function prints the same as pass-through.

Info:

Functions

export_obj (object, format) Convert a data object to the desired format (argument name provided as string), or use CONF.encoding when called without argument
print (object) Print all contents of a table in a tree representation, works with complex data structures and prints to STDOUT.
schema (object) Print the prototype (no contents only schema) of a table in a tree representation, works with complex data structures and prints to STDOUT.
warn (object) Print all contents of a table to STDERR.
spy (object) Print all contents of a table to STDERR and return same object as passthrough.


Functions

export_obj (object, format)
Convert a data object to the desired format (argument name provided as string), or use CONF.encoding when called without argument (object, format)

Parameters:

  • object data element to be converted
  • format pointer to a converter function

Returns:

    object converted to format
print (object)
Print all contents of a table in a tree representation, works with complex data structures and prints to STDOUT. (object)

Parameters:

  • object complex table data structure
schema (object)
Print the prototype (no contents only schema) of a table in a tree representation, works with complex data structures and prints to STDOUT. (object)

Parameters:

  • object complex table data structure
warn (object)
Print all contents of a table to STDERR. Works same way as print. (object)

Parameters:

  • object complex table data structure
spy (object)
Print all contents of a table to STDERR and return same object as passthrough. Works same way as print. (object)

Parameters:

  • object complex table data structure

Returns:

    object itself (passthrough for nesting)
generated by LDoc 1.5.0 Last updated 2025-03-25 10:43:18