Skip to content

Logger breaks on null values #1304

@mik115

Description

@mik115

Hi,
Gcloud logger service breaks when the passed object contains null values.
Is this an expected behaviour?

this is the raised error:

  /Users/michelepini/testPubSub/node_modules/protobufjs/dist/ProtoBuf.js:3402
            throw Error("Illegal value for "+this.toString(true)+" of type "+this.type.name+": "+val+" ("+msg+")");
            ^

Error: Illegal value for Message.Field .google.protobuf.Value.nullValue of type enum: object (proto3 field without field presence cannot be null)
at Error (native)
at .<anonymous> (/Users/michelepini/testPubSub/node_modules/protobufjs/dist/ProtoBuf.js:3402:23)
at ProtoBuf.Reflect.FieldPrototype.verifyValue (/Users/michelepini/testPubSub/node_modules/protobufjs/dist/ProtoBuf.js:3408:21)
at MessagePrototype.set (/Users/michelepini/testPubSub/node_modules/protobufjs/dist/ProtoBuf.js:2443:59)
at MessagePrototype.set (/Users/michelepini/testPubSub/node_modules/protobufjs/dist/ProtoBuf.js:2434:38)
at Message (/Users/michelepini/testPubSub/node_modules/protobufjs/dist/ProtoBuf.js:2363:34)

This is the test object that breaks the service:

 {
    message: 'messaggio di test',
    data: {
        info: {
            message: 'crawlerInterval fetching gAnalytics every 3456 ms',
            furtherInfo: null
        }
    }
}

Thanks in advance.

Metadata

Metadata

Labels

api: loggingIssues related to the Cloud Logging API.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions