The goog.debug.logRecordSerializer Namespace

.parse(s)

Deserializes a JSON-serialized LogRecord.

s {string}
The JSON serialized record.
returns {!goog.debug.LogRecord}
The deserialized record.

.serialize(record)

Serializes a LogRecord to a JSON string. Note that any associated exception is likely to be lost.

record {goog.debug.LogRecord}
The record to serialize.
returns {string}
Serialized JSON string of the log message.

.unsafeParse(s)

Deserializes a JSON-serialized LogRecord. Use this only if you're naive enough to blindly trust any JSON formatted input that comes your way.

s {string}
The JSON serialized record.
returns {!goog.debug.LogRecord}
The deserialized record.