2015-10-29 3 views
0

Когда я запускаю journalctl с выходом cat, он печатает всю трассировку стека исключений, как ожидалось. Запуск journalctl с выходом JSon и пропускает первую строку:Почему json-вывод журналаctctl не печатает всю трассировку стека исключений?

[[email protected] splunk]# journalctl -f -o cat | grep undertow 

13:35:31,858 ERROR [io.undertow.request] [bruker=01026300394 korrId=826gg6c45 kallId=826y7otah] (default task-62) Undertow request failed HttpServerExchange{ POST /startlan-esoknad/soknader/}: java.lang.NullPointerException 
     at io.undertow.servlet.spec.ServletInputStreamImpl.readIntoBuffer(ServletInputStreamImpl.java:171) 
     at io.undertow.servlet.spec.ServletInputStreamImpl.close(ServletInputStreamImpl.java:245) 
     at io.undertow.servlet.spec.HttpServletRequestImpl.closeAndDrainRequest(HttpServletRequestImpl.java:602) 
     at io.undertow.servlet.core.ServletBlockingHttpExchange.close(ServletBlockingHttpExchange.java:87) 
     at io.undertow.server.HttpServerExchange.endExchange(HttpServerExchange.java:1444) 
     at io.undertow.server.Connectors.executeRootHandler(Connectors.java:213) 
     at io.undertow.server.HttpServerExchange$1.run(HttpServerExchange.java:759) 

Когда я бегу journalctl -f -o json-pretty | grep undertow затем journalctl пропускает первая строка:

[[email protected] splunk]# journalctl -f -o json-pretty | grep undertow 

     "MESSAGE" : "\u0009at io.undertow.servlet.spec.ServletInputStreamImpl.readIntoBuffer(ServletInputStreamImpl.java:171)", 
     "MESSAGE" : "\u0009at io.undertow.servlet.spec.ServletInputStreamImpl.close(ServletInputStreamImpl.java:245)", 
     "MESSAGE" : "\u0009at io.undertow.servlet.spec.HttpServletRequestImpl.closeAndDrainRequest(HttpServletRequestImpl.java:602)", 
     "MESSAGE" : "\u0009at io.undertow.servlet.core.ServletBlockingHttpExchange.close(ServletBlockingHttpExchange.java:87)", 
     "MESSAGE" : "\u0009at io.undertow.server.HttpServerExchange.endExchange(HttpServerExchange.java:1444)", 
     "MESSAGE" : "\u0009at io.undertow.server.Connectors.executeRootHandler(Connectors.java:213)", 
     "MESSAGE" : "\u0009at io.undertow.server.HttpServerExchange$1.run(HttpServerExchange.java:759)", 

Он также пропускает первую строку вывода JSON и JSON-сс.

ответ

0

То, что я узнал, это то, что я не должен греться. journalctl не может создать json первой строки и печатает вместо цифр, что означает, что сообщение присутствует:

"MESSAGE" : [ 27, 91, 48, ...