remybach/jQuery.clientSideLogging — pull request #3 by robmiller (2012-04-04 21:28:43+00:00)
Title: Stringify log objects

When you log an object, the code currently sends the object's properties to the backend as an glob of POST variables. Since the objects that can be logged are entirely arbitrary, this means that the backend has to cope with arbitrary numbers of values, with arbitrary keys.

It's simpler to simply pass them along in "msg" as we would a text log, but encode them as JSON; that way the backend can either log them straight as JSON (since it's already a serialised data store) or decode the JSON and do what it wants with them.