[ https://issues.apache.org/jira/browse/LOG4J2-428?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14131738#comment-14131738 ]
Gary Gregory commented on LOG4J2-428:
-------------------------------------
Some notes:
- Do not use @link at the bottom of methods, it's not what this tag is for. Check out the latest from master, I'll fixed up the {{@see}} to be nicer.
The patch fails for me with:
{noformat}
java.lang.IllegalArgumentException: Can not parse expected value.
at net.javacrumbs.jsonunit.core.internal.JsonUtils.readValue(JsonUtils.java:61)
at net.javacrumbs.jsonunit.core.internal.JsonUtils.readValue(JsonUtils.java:47)
at net.javacrumbs.jsonunit.core.internal.JsonUtils.convertToJson(JsonUtils.java:78)
at net.javacrumbs.jsonunit.core.internal.Diff.create(Diff.java:73)
at net.javacrumbs.jsonunit.JsonAssert.assertJsonPartEquals(JsonAssert.java:68)
at net.javacrumbs.jsonunit.JsonAssert.assertJsonEquals(JsonAssert.java:57)
at org.apache.logging.log4j.core.layout.GelfLayoutTest.testLayout(GelfLayoutTest.java:148)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:47)
at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:44)
at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:271)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:70)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:238)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:63)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:236)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:53)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:229)
at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26)
at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27)
at org.junit.runners.ParentRunner.run(ParentRunner.java:309)
at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:50)
at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:459)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:675)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:382)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:192)
Caused by: com.fasterxml.jackson.core.JsonParseException: Illegal unquoted character ((CTRL-CHAR, code 13)): has to be escaped using backslash to be included in string value
at [Source: ***@7e4cb74; line: 1, column: 197]
at com.fasterxml.jackson.core.JsonParser._constructError(JsonParser.java:1419)
at com.fasterxml.jackson.core.base.ParserMinimalBase._reportError(ParserMinimalBase.java:508)
at com.fasterxml.jackson.core.base.ParserMinimalBase._throwUnquotedSpace(ParserMinimalBase.java:472)
at com.fasterxml.jackson.core.json.ReaderBasedJsonParser._finishString2(ReaderBasedJsonParser.java:1613)
at com.fasterxml.jackson.core.json.ReaderBasedJsonParser._finishString(ReaderBasedJsonParser.java:1585)
at com.fasterxml.jackson.core.json.ReaderBasedJsonParser.getText(ReaderBasedJsonParser.java:233)
at com.fasterxml.jackson.databind.deser.std.BaseNodeDeserializer.deserializeObject(JsonNodeDeserializer.java:224)
at com.fasterxml.jackson.databind.deser.std.JsonNodeDeserializer.deserialize(JsonNodeDeserializer.java:62)
at com.fasterxml.jackson.databind.deser.std.JsonNodeDeserializer.deserialize(JsonNodeDeserializer.java:14)
at com.fasterxml.jackson.databind.ObjectMapper._readMapAndClose(ObjectMapper.java:3051)
at com.fasterxml.jackson.databind.ObjectMapper.readTree(ObjectMapper.java:1804)
at net.javacrumbs.jsonunit.core.internal.JsonUtils.readValue(JsonUtils.java:59)
... 31 more
{noformat}
Post by Gary Gregory (JIRA)Implement a GELF layout
-----------------------
Key: LOG4J2-428
URL: https://issues.apache.org/jira/browse/LOG4J2-428
Project: Log4j 2
Issue Type: Wish
Components: Appenders
Affects Versions: 2.1
Reporter: Mark Paluch
Attachments: gelflayout.patch, log4j-gelf.patch, log4j-gelf.zip
I'd like to propose the integration of a GELF (Graylog Extended Log Format) Appender into log4j2 on a basis like the flume-ng Appender.
See https://github.com/mp911de/logstash-gelf for the code.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)