Log GeneratedMessageV3 instance

23 views
Skip to first unread message

suvh...@gmail.com

unread,
Jan 22, 2018, 3:48:55 AM1/22/18
to grpc.io
Hi,

I am trying to log the response received for a request to the server using the following statement in JAVA.

LOGGER.info("Response:{} received from UCore for PnmId:{}", next,identifier.getPnmId());

From the logs I observe that few of the fields are missing however the value exists when logging GenerateMessageV3 or by logging the typecasted GeneratedMessageV3.

22/Jan/2018 13:45:04,360- TransitionCounterStatsAction: Response:{stats.CounterList.counter=[value: 7.0
, name: UE_EMM_REGISTERED_ACTIVE
value: 5.0
, name: UE_EMM_REGISTERED_IDLE
value: 6.0
, name: TOTAL_ECM_CONNECTED_UES
value: 8.0
]} received from UCore for PnmId:525


However, when I iterate through the GeneratedMessageV3 after typecasting it to the relevant object I could find all name/value pairs getting logged.

22/Jan/2018 13:45:04,360- TransitionCounterStatsAction: on next for PnmId:525
22/Jan/2018 13:45:04,360- TransitionCounterStatsAction: Name:UE_EMM_DEREGISTERED,Value:7.0
22/Jan/2018 13:45:04,360- TransitionCounterStatsAction: Name:UE_EMM_REGISTERED_ACTIVE,Value:5.0
22/Jan/2018 13:45:04,360- TransitionCounterStatsAction: Name:UE_EMM_REGISTERED_IDLE,Value:6.0
22/Jan/2018 13:45:04,360- TransitionCounterStatsAction: Name:TOTAL_ECM_CONNECTED_UES,Value:8.0

Is this a bug or a known issue?


Regards
Basak

Carl Mastrangelo

unread,
Jan 23, 2018, 7:47:48 PM1/23/18
to grpc.io
It looks like all the fields are present, just printed in a different order.   Are you using the 'map' protobuf type by chance? 
Reply all
Reply to author
Forward
0 new messages