PDA

View Full Version : ZR Developing: Client log module


rhelgeby
09-07-2009, 20:14
For developers:
This plugin is getting complex and we need a better debugging system so we can watch evens on all or spesific parts in the plugin. With general debug messages it might be spammed because a lot of players might do the same at once.

I have an idea about a client log module that get all events in the plugin forwarded to it, where you can turn on log of one or more events on spesific clients. Then it's easier to watch events while testing in-game with a lot of players (sometimes you can't test alone or with bots). These messages could be logged to SourceMod logs, chat/admin chat or other places.

This feature will be controlled with a master switch (cvar) and the debug log flags.

What do you think of a feature like this? I hope it will be easier to properly test new features we make in ZR.

Is it worth making it?

Kigen
09-14-2009, 01:40
If put at the right spots to call it could be useful in debugging. Obviously though this would probably be a performance hit to the server. But if done right could potentially be minimal.

rhelgeby
09-14-2009, 03:11
It's all arrays and bit flags so it can't be that much of a performance hit, I think. And I'm just talking about internal events in ZR and some generic in CS:S, not all game events in the engine.

We're talking about debug mode, which is not meant to be on all the time. So when it's off it's just reading a single number.

The regular log system I made is similar, just simple arrays and bit fields. There are some string options (like the module filter), but that's converted and cached.

Performance in general is important. Especially on this plugin since it's big and complex, so we try to think of smart solutions in hot areas. ^^