question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

customfields configuration error/ignored?

See original GitHub issue

Documentation example, produce com.fasterxml.jackson.core.JsonParseException:

<customFields>{"appname":"myWebservice","roles":["customerorder","auth"],"buildinfo":{"version":"Version 0.1.0-SNAPSHOT","lastcommit":"75473700d5befa953c45f630c6d9105413c16fe1"}}</customFields> the following josn will be excepted but will not appear in output: "appname":"myWebservice","roles":["customerorder","auth"],"buildinfo":{"version":"Version 0.1.0-SNAPSHOT","lastcommit":"75473700d5befa953c45f630c6d9105413c16fe1"

setting the customfields programmatically is working fine.

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:9

github_iconTop GitHub Comments

1reaction
Qi77Qicommented, Nov 25, 2021

hi, think I’m running into the same issue

I have the following in logback.xml

    <appender name="console" class="ch.qos.logback.core.ConsoleAppender">
        <encoder class="net.logstash.logback.encoder.LogstashEncoder">
            <customFields>
                {"serviceContext":{"service":"foo"}}
            </customFields>
        </encoder>
    </appender>

When using logstash-logback-encoder 7.0.1, I’m getting the follow error

02:17:46,889 |-INFO in ch.qos.logback.core.joran.action.NestedComplexPropertyIA - Assuming default type [net.logstash.logback.fieldnames.LogstashFieldNames] for [fieldNames] property
02:17:47,133 |-ERROR in net.logstash.logback.composite.GlobalCustomFieldsJsonProvider@4d5b181d - [customFields] is not a valid JSON object com.fasterxml.jackson.core.io.JsonEOFException: Unexpected end-of-input: expected close marker for Object (start marker at [Source: (String)"{"serviceContext":{"service":"leonardo"}"; line: 1, column: 1])
 at [Source: (String)"{"serviceContext":{"service":"leonardo"}"; line: 1, column: 41]
        at com.fasterxml.jackson.core.io.JsonEOFException: Unexpected end-of-input: expected close marker for Object (start marker at [Source: (String)"{"serviceContext":{"service":"leonardo"}"; line: 1, column: 1])
 at [Source: (String)"{"serviceContext":{"service":"leonardo"}"; line: 1, column: 41]
        at      at com.fasterxml.jackson.core.base.ParserMinimalBase._reportInvalidEOF(ParserMinimalBase.java:682)
        at      at com.fasterxml.jackson.core.base.ParserBase._handleEOF(ParserBase.java:494)
        at      at com.fasterxml.jackson.core.base.ParserBase._eofAsNextChar(ParserBase.java

If I change customFields to {"serviceContext": "foo"}, things work as expected.

I tried upgrading logback-classic to 1.3.0-alpha10, but no log was generated

0reactions
github-actions[bot]commented, Apr 10, 2022

This issue has been automatically closed because there has been no response to our request for more information from the original author. With only the information that is currently in the issue, we don’t have enough information to take action. Please reach out if you have or find the answers we need so that we can investigate further.

Read more comments on GitHub >

github_iconTop Results From Across the Web

customfields configuration error/ignored? · Issue #168 - GitHub
The logback bug only applies to nested JSON objects. I just tested the following configuration. <appender class="ch.qos.logback.core.
Read more >
Bountysource
customfields configuration error/ignored ?
Read more >
Error on Custom-field Configuration page, not able...
I have developed my own Select list custom-field. It works as expected. But It is showing some error on the custom-field configuration page ......
Read more >
PS360 Reporting 3.5 Administrator Guide - Nuance
Configuring the PowerScribe 360 | Reporting Client . ... Modifying an Unreported Order or Report's Custom Field Values . . . . ....
Read more >
ServiceDesk Plus readme, release notes, and version history
Inline images are now stored in the same location that is configured as the ... Custom fields created for Incident, Service Catalog and...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found