Most recent edit on 2006-10-15 14:15:13 by FatherNitwit
Log Categories And Types
All of the log categories and types are defined in the logtypes.h file located in the common/ directory of the source code.
each category is started with a LOG_CATEGORY command, and each type in that category is specified with e LOG_TYPE command.
Edited on 2006-08-24 21:12:19 by FatherNitwit
eqemu is a mess of various logging mechanisms... here is a quick explanation:
There is an "overarching" log system, which logs into the eqemu_* files which is used for about 90% of the logging, but there is no runtime flexibility in this system
the EQDEBUG define is an older mechanism to tune the log messages coming out, but more or less, you want to leave it at its default of 5 (in makefiles/projects)... lower and you miss interesting stuff, higher and you'll log yourself to death.
the 'loglevel' variable is even older, not really used for much anymore, and should prolly be removed completely.
The logsys stuff linked above is the "new" mechanism of logging info, which allows runtime configuration of logging information and is documented at the link above. This system sits on top of the "overarching" log system, putting all of its output through the "debug" facility, and hence into eqemu_*_debug.log
finally, there is a lot of bullshit logging done with printf/cout in the code, which does not go into any of the eqemu_* files, if you use the launcher, it pipes all output (logger or direct) into the zone_* files.
Edited on 2006-03-03 01:07:46 by FatherNitwit
Edited on 2006-03-01 09:52:58 by FatherNitwit
The log.ini file
With the new logging system, comes a new configuration file. The log.ini file configures the state of each log message type when the server boots up. The main use of this file is to enable increased logging (or decreased logging) without logging into the server. One good use of this is if you need the increased logging during zone boot when you could not possibly be logged into the server.
The format of this file is simply:
(that is two underscore characters)
so an example file might be:
Oldest known version of this page was edited on 2006-02-28 23:44:46 by FatherNitwit 
Advanced Logging System
The main goal of this logging initiative is to have a lot of log information avaliable to server administrators if they need it, to help them track down problems in the server logic, without needing to rebuild their server with special prints in or whatever. The basic idea is that there is a ton of debug logging being added to the server, which are disabled by default. A player can use the new #mlog command to turn on this logging (organized by category and type), to get a better idea of what the server is doing if it is misbehaving.
The new logging system, also known as mlog or logsys, is made useful by putting tons of print statements throughout the code, explaining what the server thinks is going on. Most of these prints are just turned off by default, and you turn them on to have the server explain what it is doing.
All of the prints in the new log system are stampped with a category and a type. This divides the messages up into logical groups, which can then be toggled as needed. This allows a significan number of different prints to be compiled into the server all the time, giving you access to the information you need.
As much of the logging in zone is tied to a specific mob (generally the mob/player taking the action, or the target of the action). All of this logging can be turned on per-mob. Currently, all clients have logging enabled on themself by default, and all NPCs have it disabled. Use the #mlog command to change this.
It is very useful to use the #logs command with #mlog, to get the log messages to come out to your client, instead of having to look in your log files, but we careful if your on a lower bandwidth link, you could quickly get bogged down in messages.
The mlog command is used for two, rather different things. The first thing the mlog command does is enabled logging on mobs in the world (NPCs or clients). The second thing it does is to let you set the filters for which categories and types are enabled.
|Syntax: #mlog [subcommand]|
-- Mob Logging Togglers --
...target [on|off] - Set logging enabled for your target
...all [on|off] - Set logging enabled for all mobs and clients (prolly a bad idea)
...mobs [on|off] - Set logging enabled for all mobs
...clients [on|off] - Set logging enabled for all clients
...radius [on|off] [radius] - Set logging enable for all mobs and clients within `radius`
-- Log Settings --
...list [category] - List all log types in specified category, or all categories if none specified.
...setcat [category] [on|off] - Enable/Disable all types in a specified category
...set [type] [on|off] - Enable/Disable the specified log type
...load [filename] - Load log type settings from the file `filename`
In the code
Some day I hope to explain how this works in the code....
send logs to your client:
to enable logging:
#mlog target on
target the mob
#mlog target on
Then you can turn various log types (theres TWO _ between category and type)
#mlog set COMBAT__ATTACKS on
#mlog set COMBAT__TOHIT on
#mlog set COMBAT__DAMAGE on
#mlog set COMBAT__HITS on
#mlog set SPELLS__RESISTS on
#mlog set SPELLS__CASTING on
#mlog set SPELLS__EFFECT_VALUES on
entire categories (will spit out a lot of shit, prolly wanna look at your text logs when your done):
#mlog setcat COMBAT on
#mlog setcat SPELLS on