Is there any way to enable serialization of underscore prefixed fields by to_json or xm_gelf

Tags:

#1 dls314

Hi,

I'm trying to fit output into the GELF format and I'd like to preserve their specification that user fields have underscore prefixes. From what I read in the nxlog docs, any fields with underscore prefix wouldn't be preserved by xm_json or xm_gelf

Is that true?

Is there any way around this?

#2 adm Nxlog ✓
#1 dls314
Hi, I'm trying to fit output into the GELF format and I'd like to preserve their specification that user fields have underscore prefixes. From what I read in the nxlog docs, any fields with underscore prefix wouldn't be preserved by xm_json or xm_gelf Is that true? Is there any way around this?

Perhaps you can use rename_field() to get rid of the leading underscore or dot.