DarkRiftNetworking / DarkRift

DarkRift Networking by Unordinal
http://darkriftnetworking.com
Other
220 stars 66 forks source link

WriteEvent() doesn't wrap #86

Open Bamboy opened 5 years ago

Bamboy commented 5 years ago

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.

JamJar00 commented 5 years ago

Hey!

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

Jamie

Bamboy commented 5 years ago

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.

JamJar00 commented 5 years ago

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.

Bamboy commented 5 years ago

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)