New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

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

Comments

Projects
None yet
6 participants
@dur3x

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

This comment has been minimized.

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 closed this in 6200511 Feb 11, 2014

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

@pcrook

This comment has been minimized.

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

This comment has been minimized.

Member

edmundoa commented May 21, 2015

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

This comment has been minimized.

elfensteak commented Jun 4, 2015

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

This comment has been minimized.

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

This comment has been minimized.

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

This comment has been minimized.

Member

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

This comment has been minimized.

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

This comment has been minimized.

elfensteak commented Jun 5, 2015

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 join this conversation on GitHub. Already have an account? Sign in to comment