Skip to content
This repository has been archived by the owner on Jan 8, 2019. It is now read-only.

Replace new-lines with line breaks when displaying messages (2) #612

Closed
dur3x opened this issue Feb 11, 2014 · 9 comments
Closed

Replace new-lines with line breaks when displaying messages (2) #612

dur3x opened this issue Feb 11, 2014 · 9 comments
Assignees
Milestone

Comments

@dur3x
Copy link

dur3x commented Feb 11, 2014

Hello I come back with this problem (see #601) because this one is partially fixed in 0.20-rc.2 version.

Now when I put a '\n' in the full mesage, the new line character is correctly displayed in the tab view but not in "full view" message.

1
2

To try that I used this command:

curl -XPOST http://127.0.0.1:12202/gelf -p0 -d '{"short_message":"Test", "full_message":"line1\nline2", "personalField":"line1\nline2" ,"host":"example.org", "facility":"test"}'

Moreover is it possible to also support '\n' for another field than the "ful_message" like for personal field (see my picture), it will be great ! :-)

Thanks for your work.

@lennartkoopmann lennartkoopmann added this to the 0.20.0 milestone Feb 11, 2014
@kroepke
Copy link
Contributor

kroepke commented Feb 11, 2014

Thx for figuring this out!
I'll fix it.
Support for other fields requires some more work and we will want to make it extensible, but yes, this is something we really want to do in a future version!

@kroepke kroepke modified the milestones: 0.20.0-rc.3, 0.20.0 Feb 11, 2014
@pcrook
Copy link

pcrook commented May 21, 2015

It's not clear to me that this issue was ever fixed. I am still seeing the behavior in graylog-web Version: 1.0.1-1 (Ubuntu). A Java exception in the left pane is one giant text blob while in the right pane it's humanly readable. Has this been fixed and it regressed, or is it still pending? Thanks.

@edmundoa
Copy link
Contributor

Hi @pcrook,

We reworked the whole search result page for 1.1, so this should behave much better now. Please take a look at the beta release.

@elfensteak
Copy link

Hi @edmundoa,
yesterday I've installed 1.1.0-rc.3 and still see no line breaks.
A single \n and also \t is translated into a line break and tabulator, but without pre tags the line break won't be shown.
Maybe you could add <pre></pre> - Tags for example in graylog2-web-interface/javascript/src/components/search/MessageTableEntry.jsx at line 93:

`

...`

Thank you!

@pcrook
Copy link

pcrook commented Jun 4, 2015

@elfensteak - Have you confirmed that this change works?
@edmundoa - It appears that this problem persists in the newest release. Can this issue be reopened?

@edmundoa edmundoa reopened this Jun 4, 2015
@pcrook
Copy link

pcrook commented Jun 4, 2015

@edmundoa - Thank you.
Here's a picture of my graylog-web 1.0.1-1 interface while a Java exception is displayed. On the left, it's undecipherable. When selected, it's humanly-readable, as seen on the right. (Hopefully this screenshot from a 4K monitor will scale properly).
image

@edmundoa
Copy link
Contributor

edmundoa commented Jun 4, 2015

@pcrook that is an old version, at least not 1.1 (the final version was launched just today) and where we changed the whole search result UI. Apparently it doesn't fix the multi-line messages, but still :)

@pcrook
Copy link

pcrook commented Jun 4, 2015

@edmundoa - Sorry. I don't have a 1.1 installation to grab from. I was just wanted to convey the user experience while trying to navigate through a series of multi-line log events. I have no idea what this looks like now.
@elfensteak - Perhaps you could paste a similar picture of the 1.1 interface. Thanks.

@elfensteak
Copy link

Here you can see the new UI (1.1 rc3). I like it very much.
You can see the Firefox Code Inspector at the screenshots bottom.
Graylog formats \n and \t correct, but this isn't interpreted by the browser as long as the message output isn't enclosed by <pre></pre> tags.
I'couldn't test this solution until now.

search_results

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants