Log in

View Full Version : Some ideas


jbb
05-20-2003, 09:57 PM
I'd like to help with the code but don't want to mess with the code code until I understand it all a lot better than I do now.

So I though of a few minor things I could add so I thought I'd post the ideas here to see if people think they are worth the effort. The ideas are something I could do farily quickly without understanding the existing code in detail which would make life easier for users and hopefully to cut down slightly on the number of FAQs asked in the forum?

1. There are a lot of posts that people's servers won't run properly which are generally down to things not being set up properly. So how about getting "world" to make a whole lot of checks when it starts up and output better messages. Things like checking that the database is accessable, that it contains at least basic item data and zonepoints etc. Getting "zone" to check that the ip addresses it is given actually connect to a world server.

I know it does a lot of these already deeper in the code, and does output messages but it tends to stumble on anyway giving out confusing error messages to say the least.

It might be an idea to check a lot of things *on startup* simply so that it can output a specific error message and shutdown. Should reduce the number of posts in the support forum anyway.

2. How about an optional "gui" frontend program which runs the world and zone servers up and manages them and displays their output in a window or something so that it all looks like one program. Maybe using wxWindows or python to make it cross platform. It could filter messages (see 3) and provide a menu using the telnet interface perhaps to shut down the server and so on.

3. Improved messages. At the moment it's impossible to distinguish between a fatal error and a debug print in the output from the programs. How about prefixing all the output strings with a severity code such as [F] for fatal errors, [E] for errors, [W] for warnings, [I] for information, [T] for trace, [D] for debug. That way a frontend program like the one in (2) can choose to filter out the trace and debug messages and to hilight any errors and warnings in a different colour.


Anyway, these are things which look like I could do fairly quickly and which would make it all a bit easier to use and administer the program.

Comments?

Trumpcard
05-21-2003, 01:00 AM
1. Better informational messages and checks are always appreciated. Good logging should be the basis of any halfassed application, and logging in eqemu is fairly inconsistant (open source, 101 different fingers and no standards, so no ones fault)

2. Relatively useless IMHO. It just doesnt provide much.

3. Ties with 1, and logging. If you really think a frontend will help out, more power to you, I just dont see it being awfully useful. Once again, more checks/error conditions are always useful, and standardizing the logging will help. A big help would be going through the code and fixing all the cast conditions occur where someone takes a float and tries to squeeze it directly into an int. Most of the time on linux they're just warnings, but sometimes you loose something you didnt mean too. (Windows dev's dont pay much attention to casting).

Any help is appreciated, and those are just my opinions, you are free to pursue whatever you feel is worthy, and I'll make sure it gets into the code base if it's acceptable.

jbb
05-21-2003, 01:20 AM
Ok, I'll have a look at improving the logging for a while. It's the kind of thing I can do occasionally as and when I have time without needed a huge chunk of time in one go.

I'll post some updates probably early next week.

Trumpcard
05-21-2003, 02:26 AM
There are tons of things that could use so help..

Post some changes/fixes, then come talk to us in irc if you'd like to become a certified (or certifiable) developer... We definitely could use an injection of new developer blood in the project

jbb
05-21-2003, 02:57 AM
Well I've probably got no more free time than anyone else, but I though that was a reasonably easy way to see how the code works while doing something useful.

jbb
05-22-2003, 09:52 AM
What's the best way to submit changes?

I've checked out the cvs version from sourceforce and made some updates to that. I need to make a diff and submit that to this forum?

What's the best way to do that? To check out a copy of the source, make another local copy and work on the copy, and then make a diff between my two versions? Or is there a simpler way?

Finally I think me diffs might break because I've removed ^M from the end of a lot of lines (working mostly on linux). Any ideas how to work with that?

What I've done so far is spent a bit of time making some of the output prints more consistent in their format, and mark them with a severity code (so the general information and debug prints can be separated from serious errors) and made a function to output them with a bit more consistency than the current random mix of cout and printfs. I've also added fairly comments to the top of a few of the functions explaining what they do as I figured it out... I thought that might be useful.

Basically I've only spent an hour or two looking at it so won't be offended if you say thanks but this isn't what we need but wanted to see if this was useful before doing much more... When I understand how it works I should be able to make more substantial additions.

Hopefully I could post something on about saturday...

Bigpull
05-22-2003, 11:00 PM
Unfortunatly a database verification function/program isn't as simple as one would think at first, maybe i just need to step out of the box..

IP detection is very OS dependant, and it using what you feed it instead of autodetecting is a feature, think multihomed, nat ect.

Log messages aren't standard no big suprise there, we pick what we think is sufficient and go with it.

Gui is a waste of cpu for a server program, implement it as a logfile monitor and it can be included as an optional execuable.

The log messages do have a standard and include "[Message type]" tags,

jbb
05-22-2003, 11:45 PM
I agree with most of what you are saying here.

For database checks - When I was first getting started trying to run the server and didn't really know what I was doing I found it very hard to tell from the errors that came out sometimes what it was I'd done wrong. I think mostly it's because it fails something in the main code when it can't find an item it wants so you get an error about that rather than one saying that the whole table is empty and you'd better put something in it. I wasn't thinking of anything particularly sophisticated.

I agree about having a logfile monitor. That's actually what I meant. Just something that runs the world and zone servers and captures and presents their output in a unified way and which is totally optional.

Well if there is a standard for log output I can't find it! If someone can point out to me what they'd like I'm volunteering to make the log messages more consistent and helpful. I know that people add what the need at the time. But more sereration between error messages, information messages (like who zoned in etc.) and general debug spam would be very helpful I think.