One more logging question/possible bug...
Built-in JS objects including Date, Error, undefined, and RegExp are not serializable into the proto. Is the intent to support these? (Maybe depends if you consider these "objects" when reading the JSON spec.)
var entry = log.entry(resource, {
someDate: new Date()
});
log.write(entry...) // Error: .google.protobuf.Value#timestampValue is not a field: undefined
var entry = log.entry(resource, {
someErr: new Error("ohno")
});
log.write(entry...) // Error: Value of type object not recognized
// same error for RegExp
var entry = log.entry(resource, {
someValue: undefined
});
log.write(entry...) // Error: Value of type undefined not recognized
At least Date and Error are common in logs and I think nice to support (otherwise as a consumer I'm manually casting these to strings). The others (RegExp, typed arrays, others?) I think are less common. For comparison, BSON allows Date.
One more logging question/possible bug...
Built-in JS objects including Date, Error, undefined, and RegExp are not serializable into the proto. Is the intent to support these? (Maybe depends if you consider these "objects" when reading the JSON spec.)
At least Date and Error are common in logs and I think nice to support (otherwise as a consumer I'm manually casting these to strings). The others (RegExp, typed arrays, others?) I think are less common. For comparison, BSON allows Date.