DarkRift icon indicating copy to clipboard operation
DarkRift copied to clipboard

WriteEvent() doesn't wrap

Open Bamboy opened this issue 6 years ago • 4 comments

WriteEvent() should wrap to use the entire console window, not just the right half of the console window.

Allows for easier viewing of debug information.

Bamboy avatar Jul 13 '19 02:07 Bamboy

Hey!

I'm not sure I follow this request I'm afraid, could you attach a screenshot of what's wrong?

Jamie

JamJar00 avatar Jul 16 '19 16:07 JamJar00

Unfortunately I've set Console.Width to be higher than default, and the issue only happens with WriteEvent, which in most places I'm no longer using (In favor of having colors) So I can't easily get you a screen shot right now.

In the console the name of the plugin that called WriteEvent reserves a portion of the left side of the console window for the entire message, and the WriteEvent text doesn't go below it.

I'm sure it was implemented this way intentionallybut seems odd to me (and not a bug) , especially without increasing the Console.Width.

Bamboy avatar Jul 16 '19 16:07 Bamboy

For example like this? image I think the main reason was because it was a simple solution to ensure that things like this end up formatted correctly: image I'm not entirely sure how a more intelligent algorithm would circumvent this with out looking strange however.

To be honest, it should probably be configurable in the Server.config file so that users can choose padding etc. how they like, or can alternatively choose to output JSON logs etc.

JamJar00 avatar Jul 16 '19 16:07 JamJar00

The stage i was at the other day I was dumping thousands of lines of info and I really needed the extra space. I later found out about Console.Width which helped some.

The formatting is nice but not during the programming stage? You could have an optional boolean for WriteEvent that turns off formatting. (on by default)

Bamboy avatar Jul 16 '19 17:07 Bamboy