Skip to content

Nested data in field(s) #3

@omega

Description

@omega

Hey, I am currently trying to write some log4perl code that I want to ship as json to Logstash (in the end). I am shipping via message-passing, but I think the problem I am seeing stems from the JSON layout in Log4perl.

if I set fields like this:

log4perl.appender.UDP.layout.field.tags         = perl:Class:%C
log4perl.appender.UDP.layout.field.tags         = spine

I end up with tags being the stringified arrayref when I get the message through to message-passing, and I assume that is because this JSON layout uses PatternLayout to stringify all fields (to expand %-values I assume).

I was wondering if it is correct to fix fields somehow, or if it is better (and more likely to get merged) if I add another accessor called list_field or some such that handles this better by also stringifiing the list-ref? For my use-case single-level nesting is good enough, but not sure if that is generic enough for a solution here?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions