rbx-log icon indicating copy to clipboard operation
rbx-log copied to clipboard

Render unknown Roblox datatypes in tables differently

Open tacheometry opened this issue 3 years ago • 0 comments

Right now, if I log a table with, say, a CFrame inside it, and make it print to the Roblox output, it renders like so:

Log.Info("Some table: {Value}", { myKey: new CFrame() });
[INFO] Some table: {"myKey":null}

The table output is okay. However, myKey's value is interpreted as null, and this makes reading this output pretty confusing! Could Roblox data types be interpreted like the below?

{"myKey":<CFrame>}

or maybe even with the CFrame's components? (I doubt people would really be interested in this method though.)

{"myKey":CFrame(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1)}

The same thing happens with stuff like Instances - they get printed as null.

tacheometry avatar Aug 19 '22 15:08 tacheometry