viacheslav-lozinskyi / MetaOutput

Work with output data / log files never been so simple!
50 stars 7 forks source link

Request to support word wrapping #25

Open tamas-karpati opened 2 weeks ago

tamas-karpati commented 2 weeks ago

Hi,

I'd like to suggest a possible improvement: ability to turn on word wrapping to show long lines properly.

Right now if you have a complex log output with dates, severity levels, categories and longer messages, the output is mostly unreadable without making the extension window unreasonably wide, which is not suitable for most window layouts. See the attached screenshot.

image

I know that hovering over the "..." icon shows a tooltip with the full message in it, but that's pretty cumbersome to use since I must wait for several seconds just to see one message.

I saw that font size setting will be part of a new update, but in my opinion that will solve half of the problem. To show very long lines in their entirety, one must set a pretty small font size, that will make readability even worse.

viacheslav-lozinskyi commented 2 weeks ago

Hi,

I thought about it, but right now I don't see good solution.

Solution should be somewhere in the middle. As for me better decision will be showing whole message in word wrap mode (as you want), but it will not be activated by default. It will be activated only for that message where was pressed button "..." (only for last one). Button "..." is button, but not place for hint.

In next version I will do such implementation.

In any case, thank you for improvement proposition.

tamas-karpati commented 2 weeks ago

Thank you for the quick response. I can live with your proposed solution by clicking on the button for a long message I want to read. I saw that the "..." icon is really a button, it has a hovered state, but it doesn't do anything on click.

viacheslav-lozinskyi commented 2 weeks ago

I agree that current behaver of button "..." confuse users. It will be fixed in next version.

tamas-karpati commented 2 weeks ago

One more thing. I see that MetaOutput doesn't know if output timestamps are enabled in Visual Studio. In that case there is a redundant timestamp in the MetaOutput window.

image

For this case, there should be an option to turn off MetaOutput's own timestamps or MO should filter the timestamp string from the message itself.

This would make at least a 100px room for the rest of the message.

Should I create a new issue for this?

viacheslav-lozinskyi commented 2 weeks ago

In MetaOutput it's implemented by other way. It has some number of rules for data transformation. One of such rules - is extracting timestamp/source/event/category. As result you will see clean message with extracted information in correct places. For your case such rule is not implemented, therefore you see some specific information as part of text message.

If you write that messages from your code, you can change such message: [2024-10-08T10:22:03.547Z][Debug][RemoteLogger]: some message

To this message: [RemoteLogger]: some message @@@SOURCE DEBUG @@@EVENT DEBUG @@@TIME 2024-10-08T10:22:03.547Z @@@FOREGROUND TEAL

Result will look much better...

Moreover MetaOutput show everything based on TML (Trace Message Language). It's new data definition language which allow to make magic with this tool :)