Difference between revisions of "Admins:LogSystem"
John adams (talk | contribs) (Created page with "== EQ2Emulator: Log System == The 'log_config.xml' file is the '''optional''' Log System configuration file for EQ2Emulator Server. All loggers have default settings defined in t...") |
|||
| (6 intermediate revisions by 2 users not shown) | |||
| Line 1: | Line 1: | ||
| − | + | {{PageHeaderChild|Admins|Log System}} | |
| + | <br/> | ||
The 'log_config.xml' file is the '''optional''' Log System configuration file for EQ2Emulator Server. All loggers have default settings defined in the code (LogTypes.h) and this file is used to override those defaults without having to recompile the code. | The 'log_config.xml' file is the '''optional''' Log System configuration file for EQ2Emulator Server. All loggers have default settings defined in the code (LogTypes.h) and this file is used to override those defaults without having to recompile the code. | ||
| + | |||
| + | |||
| + | Scatman has implemented "log queuing" functionality for our very active Log System. The problem was, so many logs were being written at the same time, they started to inject over each other making the logs unreadable. Now, logs are handled as FIFO - First In, First Out. The system is undergoing extensive testing, but for now performs wonderfully with the addition of the "Level" parameter as well. | ||
The LogWrite system consists of these elements: | The LogWrite system consists of these elements: | ||
| − | LogWrite(CATEGORY__TYPE, "Tag", "Formatted Text", params); | + | LogWrite(CATEGORY__TYPE, Level, "Tag", "Formatted Text", params); |
| − | + | {{Header|Categories|BackgroundColor=3d78b4|FontColor=ffffff}} | |
This is the list of current CATEGORIES available: | This is the list of current CATEGORIES available: | ||
| − | = | + | {|style="table-layout:fixed; width: 100%;" |
| − | + | |{{TextBox|System Loggers|WORLD<br/>LOGIN<br/>PATCHER<br/>PARSER<br/>INIT<br/>DATABASE<br/>MUTEX<br/>MISC|BackgroundColor=ffffff|FontColor=000}} | |
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | = | + | {|style="table-layout:fixed; width: 100%;" |
| − | + | |{{TextBox|Network Loggers|CCLIENT<br/>NET<br/>OPCODE<br/>PACKET|BackgroundColor=ffffff|FontColor=000}} | |
| − | |||
| − | |||
| − | |||
| − | = | + | {|style="table-layout:fixed; width: 100%;" |
| − | + | |{{TextBox|Player Loggers|PLAYER|BackgroundColor=ffffff|FontColor=000}} | |
| − | = | + | {|style="table-layout:fixed; width: 100%;" |
| − | + | |{{TextBox|SubSystem Loggers|CHAT<br/>COLLECTIONS<br/>COMBAT<br/>COMMAND<br/>FACTION<br/>GUILD<br/>ITEM<br/>LOOT<br/>LUA<br/>MERCHANT<br/>NPC<br/>NPC_AI<br/>QUEST<br/>RECIPES<br/>RULES<br/>SKILLS<br/>SPELLS<br/>TRADESKILLS|BackgroundColor=ffffff|FontColor=000}} | |
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | = | + | {|style="table-layout:fixed; width: 100%;" |
| − | + | |{{TextBox|Spawn Loggers|SPAWN<br/>OBJECT<br/>SIGN<br/>WIDGET<br/>GROUNDSPAWN|BackgroundColor=ffffff|FontColor=000}} | |
| − | |||
| − | |||
| − | |||
| − | |||
| − | = | + | {|style="table-layout:fixed; width: 100%;" |
| − | + | |{{TextBox|Zone Loggers|ZONE<br/>INSTANCE|BackgroundColor=ffffff|FontColor=000}} | |
| − | |||
| − | + | {{Header|Types|BackgroundColor=3d78b4|FontColor=ffffff}} | |
All CATEGORIES have 7 TYPES, with some categories having a few extra as needed: | All CATEGORIES have 7 TYPES, with some categories having a few extra as needed: | ||
| Line 73: | Line 45: | ||
| − | == | + | {{Header|Level|BackgroundColor=3d78b4|FontColor=ffffff}} |
| + | The "Level" parameter tells the logger how much detail you wish to see in your debugging of a particular logger. Valid range is 0 (minimal) through 9 (maximum). | ||
| + | |||
| + | ''Examples'': | ||
| + | Default Level 0: Displays only the minumum amount of debugging for an event - Ie., Loading Items... | ||
| + | Level 3: Might show Items loading, and display each TYPE of item loaded and it's counts | ||
| + | Level 9: Might show each and every item loading with all of it's possible values (not advised) | ||
| + | |||
| + | |||
| + | {{Header|Color|BackgroundColor=3d78b4|FontColor=ffffff}} | ||
The "Color" parameter allows you to set your own color for the log entry (restricted to defined colors in code) | The "Color" parameter allows you to set your own color for the log entry (restricted to defined colors in code) | ||
| Line 85: | Line 66: | ||
| − | + | {{Header|Enabled|BackgroundColor=3d78b4|FontColor=ffffff}} | |
The "Enabled" parameter allows you to toggle the logger on or off without removing the entry from log_config.xml | The "Enabled" parameter allows you to toggle the logger on or off without removing the entry from log_config.xml | ||
| − | + | ||
| + | {{Header|Logs|BackgroundColor=3d78b4|FontColor=ffffff}} | ||
The "Logs" parameter lets you direct the logger to one of 3 outputs, or any combination of the 3 (bitwise): | The "Logs" parameter lets you direct the logger to one of 3 outputs, or any combination of the 3 (bitwise): | ||
| Line 100: | Line 82: | ||
To direct logger output to just File, Logs="1" | To direct logger output to just File, Logs="1" | ||
| − | + | ||
| + | {{Header|Example|BackgroundColor=3d78b4|FontColor=ffffff}} | ||
Example LogConfig (you can use any 1 TYPE definition, you do not need them all, but the XML must be formatted as follows): | Example LogConfig (you can use any 1 TYPE definition, you do not need them all, but the XML must be formatted as follows): | ||
<LogConfig Category="WORLD"> | <LogConfig Category="WORLD"> | ||
| − | <ConfigType Type="DEBUG" Color="GreenBold" Enabled="True" Logs="3" /> | + | <ConfigType Type="DEBUG" Level="0" Color="GreenBold" Enabled="True" Logs="3" /> |
| − | <ConfigType Type="DATA" Color="White" Enabled="True" Logs="1" /> | + | <ConfigType Type="DATA" Level="5" Color="White" Enabled="True" Logs="1" /> |
</LogConfig> | </LogConfig> | ||
This example overrides the default WORLD category, DEBUG and DATA types, to write to the console and/or just the log file. | This example overrides the default WORLD category, DEBUG and DATA types, to write to the console and/or just the log file. | ||
Latest revision as of 18:23, 3 August 2015
Admins - Log System
Return to: Admins | Tutorials | Portal | Forum | Project Manager | Bug Tracker
The 'log_config.xml' file is the optional Log System configuration file for EQ2Emulator Server. All loggers have default settings defined in the code (LogTypes.h) and this file is used to override those defaults without having to recompile the code.
Scatman has implemented "log queuing" functionality for our very active Log System. The problem was, so many logs were being written at the same time, they started to inject over each other making the logs unreadable. Now, logs are handled as FIFO - First In, First Out. The system is undergoing extensive testing, but for now performs wonderfully with the addition of the "Level" parameter as well.
The LogWrite system consists of these elements:
LogWrite(CATEGORY__TYPE, Level, "Tag", "Formatted Text", params);
This is the list of current CATEGORIES available:
System Loggers WORLD
|