From: <lpa...@us...> - 2013-11-08 15:31:32
|
Revision: 8960 http://sourceforge.net/p/planeshift/code/8960 Author: lpancallo Date: 2013-11-08 15:31:29 +0000 (Fri, 08 Nov 2013) Log Message: ----------- Reviewed LOG options, added description to each. Modified Paths: -------------- trunk/src/common/net/connection.cpp trunk/src/common/util/log.cpp trunk/src/common/util/log.h trunk/src/server/adminmanager.cpp trunk/src/server/bulkobjects/pscharacter.cpp trunk/src/server/gem.cpp trunk/src/server/marriagemanager.cpp trunk/src/server/psserver.cpp trunk/src/server/psserverchar.cpp trunk/src/server/spawnmanager.cpp Modified: trunk/src/common/net/connection.cpp =================================================================== --- trunk/src/common/net/connection.cpp 2013-11-08 07:44:23 UTC (rev 8959) +++ trunk/src/common/net/connection.cpp 2013-11-08 15:31:29 UTC (rev 8960) @@ -232,7 +232,7 @@ laststatdisplay = currentticks; - if (pslog::disp_flag[LOG_LOAD]) + if (pslog::disp_flag[LOG_NET]) { printf("+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++\n"); printf("+ Currently using %1.2fKbps out, %1.2fkbps in...\n", Modified: trunk/src/common/util/log.cpp =================================================================== --- trunk/src/common/util/log.cpp 2013-11-08 07:44:23 UTC (rev 8959) +++ trunk/src/common/util/log.cpp 2013-11-08 15:31:29 UTC (rev 8960) @@ -62,7 +62,7 @@ "LOG_SKILLXP", "LOG_QUESTS", "LOG_SCRIPT", - "LOG_MARRIAGE", + "LOG_RELATIONSHIPS", "LOG_MESSAGES", "LOG_CACHE", "LOG_PETS", @@ -100,7 +100,7 @@ "PlaneShift.Log.SkillXP", "PlaneShift.Log.Quests", "PlaneShift.Log.Script", - "PlaneShift.Log.Marriage", + "PlaneShift.Log.Relationships", "PlaneShift.Log.Messages", "PlaneShift.Log.Cache", "PlaneShift.Log.Pets", Modified: trunk/src/common/util/log.h =================================================================== --- trunk/src/common/util/log.h 2013-11-08 07:44:23 UTC (rev 8959) +++ trunk/src/common/util/log.h 2013-11-08 15:31:29 UTC (rev 8960) @@ -34,41 +34,110 @@ enum LOG_TYPES { LOG_ANY, + + // Lights update, time of the day, snow, fog, rain, lightning messages LOG_WEATHER, + + // Item spawned, hunt location added, NPCs spawned or killed LOG_SPAWN, + + // Entities and gemobjects added/removed (NPCs, items, action locations) LOG_CELPERSIST, + + // UI widget loading, and interaction LOG_PAWS, + + // player added to a group LOG_GROUP, + + // PaladinJr, speed cheat detection, item cheat detection LOG_CHEAT, + + // Player movement and falling down LOG_LINMOVE, + + // casting spell and success rate LOG_SPELLS, + + // Character creation messages LOG_NEWCHAR, + + // Bunch of actions sent to superclient: new entities, sit, die, spell casting, switch player mode, crafting LOG_SUPERCLIENT, + + // Bank, storage, exchange of items between players LOG_EXCHANGES, + + // GM Commands LOG_ADMIN, + + // Messages on how many objects have been loaded at server startup LOG_STARTUP, + + // Traits, sockets, material change on meshes LOG_CHARACTER, + + // server connections, login, authentication request, disconnects LOG_CONNECTIONS, + + // players chat LOG_CHAT, + + // Mix of everything, needs a rework. npcclient messages, authentication, malformed messages LOG_NET, + + // Loading screen between zones, sector crossing LOG_LOAD, + + // NPCClient perceptions handling. NPC Dialogues resolution LOG_NPC, + + // Crafting LOG_TRADE, + + // server side and clien side handling of sounds LOG_SOUND, + + // combat resolution, damage, loot, stances, animations LOG_COMBAT, + + // gaining XP, spending XP and training LOG_SKILLXP, + + // Startup quest parsing. In game assign, discard, complete quests. Dialogues on quests LOG_QUESTS, + + // mathscript (rarely used) LOG_SCRIPT, - LOG_MARRIAGE, + + // Buddy list, marriage, alliances + LOG_RELATIONSHIPS, + + // server <-> client low level communication (very verbose!) LOG_MESSAGES, + + // addeding/deleting objects from CacheManager LOG_CACHE, + + // Pets management. Rarely used. LOG_PETS, + + // Mix of user/item actions. may need rework. LOG_USER, + + // Random treasure generation LOG_LOOT, + + // Never used!! LOG_DUELS, + + // Dead reckoning positional/navigation data (very verbose) LOG_DRDATA, + + // Action Locations, puzzles and mechanisms LOG_ACTIONLOCATION, -// NOTE: Remember to update the flagnames and flagsettings tables in log.cpp when addning new entries + +// NOTE: Remember to update the flagnames and flagsettings tables in log.cpp when adding new entries MAX_FLAGS }; Modified: trunk/src/server/adminmanager.cpp =================================================================== --- trunk/src/server/adminmanager.cpp 2013-11-08 07:44:23 UTC (rev 8959) +++ trunk/src/server/adminmanager.cpp 2013-11-08 15:31:29 UTC (rev 8960) @@ -5681,7 +5681,7 @@ csString spouseName = spouseFullName.Slice(0, spouseFullName.FindFirst(' ')); marriageMgr->DeleteMarriageInfo(divorcerChar); psserver->SendSystemInfo(me->clientnum, "You have divorced %s from %s.", data->target.GetData(), spouseName.GetData()); - Debug3(LOG_MARRIAGE, me->clientnum, "%s divorced from %s.", data->target.GetData(), spouseName.GetData()); + Debug3(LOG_RELATIONSHIPS, me->clientnum, "%s divorced from %s.", data->target.GetData(), spouseName.GetData()); } void AdminManager::ViewMarriage(MsgEntry* me, AdminCmdData* cmddata) Modified: trunk/src/server/bulkobjects/pscharacter.cpp =================================================================== --- trunk/src/server/bulkobjects/pscharacter.cpp 2013-11-08 07:44:23 UTC (rev 8959) +++ trunk/src/server/bulkobjects/pscharacter.cpp 2013-11-08 15:31:29 UTC (rev 8960) @@ -842,7 +842,7 @@ SetSpouseName(spouseName); - Notify2(LOG_MARRIAGE, "Successfully loaded marriage info for %s", name.GetData()); + Notify2(LOG_RELATIONSHIPS, "Successfully loaded marriage info for %s", name.GetData()); break; } } Modified: trunk/src/server/gem.cpp =================================================================== --- trunk/src/server/gem.cpp 2013-11-08 07:44:23 UTC (rev 8959) +++ trunk/src/server/gem.cpp 2013-11-08 15:31:29 UTC (rev 8960) @@ -5053,7 +5053,7 @@ if(who && !sayPublic) // specific client specified means use /tell not /say { - Notify2(LOG_CHAT,"Private NPC Response: %s\n", sayText); + Notify2(LOG_NPC,"Private NPC Response: %s\n", sayText); // Some NPC responses are now in the form of private tells. psChatMessage newMsg(who->GetClientNum(), eid, GetName(), 0, sayText, chtype, false); @@ -5068,7 +5068,7 @@ } else { - Notify2(LOG_CHAT,"Public NPC Response: %s\n", sayText); + Notify2(LOG_NPC,"Public NPC Response: %s\n", sayText); // Some NPC responses are now in the form of public /says. psChatMessage newMsg(0, eid, GetName(), 0, sayText, chtype, false); newMsg.Multicast(GetMulticastClients(), 0, CHAT_SAY_RANGE); @@ -5096,7 +5096,7 @@ if(who && !actionPublic) { - Notify2(LOG_CHAT,"Private NPC action: %s\n", actText); + Notify2(LOG_NPC,"Private NPC action: %s\n", actText); // Some NPC actions are now in the form of private actions. psChatMessage msg(who->GetClientNum(), eid, GetName(), 0, actText, chtype, false); @@ -5111,7 +5111,7 @@ } else { - Notify2(LOG_CHAT,"Public NPC action: %s\n", actText); + Notify2(LOG_NPC,"Public NPC action: %s\n", actText); // Some NPC actions are now in the form of public /me, or /mys psChatMessage msg(0, eid, GetName(), 0, actText, chtype, false); msg.Multicast(GetMulticastClients(), 0, CHAT_SAY_RANGE); Modified: trunk/src/server/marriagemanager.cpp =================================================================== --- trunk/src/server/marriagemanager.cpp 2013-11-08 07:44:23 UTC (rev 8959) +++ trunk/src/server/marriagemanager.cpp 2013-11-08 15:31:29 UTC (rev 8960) @@ -93,7 +93,7 @@ psserver->SendSystemError( proposerClient->GetClientNum(), tempStr.GetData() ); - Debug3( LOG_MARRIAGE, proposerClient->GetClientNum(),"%s rejected the marriage proposal from %s.", proposedCharFirstName, proposerFirstName ); + Debug3( LOG_RELATIONSHIPS, proposerClient->GetClientNum(),"%s rejected the marriage proposal from %s.", proposedCharFirstName, proposerFirstName ); return; } @@ -114,7 +114,7 @@ tempStr.Format( "Congratulations! You are now married to %s", proposerFirstName ); psserver->SendSystemResult( proposedClient->GetClientNum(), tempStr.GetData() ); - Debug3( LOG_MARRIAGE, proposerClient->GetClientNum(),"\n%s is now married to %s.\n", proposedCharFirstName, proposerFirstName ); + Debug3( LOG_RELATIONSHIPS, proposerClient->GetClientNum(),"\n%s is now married to %s.\n", proposedCharFirstName, proposerFirstName ); } }; @@ -172,7 +172,7 @@ psserver->SendSystemError( divorcerClient->GetClientNum(), tempStr.GetData() ); - Debug3( LOG_MARRIAGE, clientnum, "%s rejected the divorce request from %s.", + Debug3( LOG_RELATIONSHIPS, clientnum, "%s rejected the divorce request from %s.", divorcedFirstName.GetDataSafe(), divorcerFirstName.GetDataSafe() ); return; } @@ -184,7 +184,7 @@ psserver->SendSystemResult( divorcerClient->GetClientNum(), "You are now divorced." ); psserver->SendSystemResult( divorcedClient->GetClientNum(), "You are now divorced."); - Debug3( LOG_MARRIAGE, divorcedClient->GetClientNum(),"%s divorced from %s.", divorcerFirstName.GetData(), divorcedFirstName.GetData() ); + Debug3( LOG_RELATIONSHIPS, divorcedClient->GetClientNum(),"%s divorced from %s.", divorcerFirstName.GetData(), divorcedFirstName.GetData() ); } }; @@ -312,7 +312,7 @@ PendingQuestion* invite = new PendingMarriageProposal( client, proposedClient, tempStr.GetData() ); psserver->questionmanager->SendQuestion(invite); - Debug3( LOG_MARRIAGE, client->GetClientNum(),"%s has proposed %s for Marriage", proposerName.GetData(), proposedCharName.GetData() ); + Debug3( LOG_RELATIONSHIPS, client->GetClientNum(),"%s has proposed %s for Marriage", proposerName.GetData(), proposedCharName.GetData() ); } else { @@ -369,7 +369,7 @@ PendingQuestion *invite = new PendingMarriageDivorce( client, divorcedClient, tempStr.GetData() ); psserver->questionmanager->SendQuestion(invite); - Debug3( LOG_MARRIAGE, client->GetClientNum(),"%s wants to divorce from %s", divorcerName.GetData(), divorcedChar.GetData() ); + Debug3( LOG_RELATIONSHIPS, client->GetClientNum(),"%s wants to divorce from %s", divorcerName.GetData(), divorcedChar.GetData() ); } else @@ -428,7 +428,7 @@ charData->SetSpouseName( spouseFullName ); spouseData->SetSpouseName( charFullName ); - Notify3( LOG_MARRIAGE, "SetSpouseName(): %s now has %s as spouse.", charFullName, spouseFullName ); + Notify3( LOG_RELATIONSHIPS, "SetSpouseName(): %s now has %s as spouse.", charFullName, spouseFullName ); return true; } Modified: trunk/src/server/psserver.cpp =================================================================== --- trunk/src/server/psserver.cpp 2013-11-08 07:44:23 UTC (rev 8959) +++ trunk/src/server/psserver.cpp 2013-11-08 15:31:29 UTC (rev 8960) @@ -635,7 +635,7 @@ psserver->GetLogCSV()->Write(CSV_AUTHENT, status); - Notify3(LOG_CHARACTER, "Remove player '%s' (%d)", client->GetName(),client->GetClientNum()); + Notify3(LOG_CONNECTIONS, "Remove player '%s' (%d)", client->GetName(),client->GetClientNum()); client->Disconnect(); Modified: trunk/src/server/psserverchar.cpp =================================================================== --- trunk/src/server/psserverchar.cpp 2013-11-08 07:44:23 UTC (rev 8959) +++ trunk/src/server/psserverchar.cpp 2013-11-08 15:31:29 UTC (rev 8960) @@ -1173,7 +1173,7 @@ if (!*merchant) { psserver->SendSystemInfo(client->GetClientNum(),"You can only buy from a merchant."); - Debug4(LOG_CHARACTER,client->GetClientNum(),"Player %s failed to %s item %s. No merchant!\n", + Debug4(LOG_EXCHANGES,client->GetClientNum(),"Player %s failed to %s item %s. No merchant!\n", character->GetCharName(), trade, itemName); return false; } @@ -1519,7 +1519,7 @@ if (!*storage) { psserver->SendSystemInfo(client->GetClientNum(),"You can only store item with someone owning a storage."); - Debug4(LOG_CHARACTER,client->GetClientNum(),"Player %s failed to %s item %s. No storage!\n", + Debug4(LOG_EXCHANGES,client->GetClientNum(),"Player %s failed to %s item %s. No storage!\n", character->GetCharName(), trade, itemName); return false; } Modified: trunk/src/server/spawnmanager.cpp =================================================================== --- trunk/src/server/spawnmanager.cpp 2013-11-08 07:44:23 UTC (rev 8959) +++ trunk/src/server/spawnmanager.cpp 2013-11-08 15:31:29 UTC (rev 8960) @@ -1044,7 +1044,7 @@ } else // Handle NPC dying { - Debug1(LOG_NPC, 0,"Killing npc in spawnmanager.\n"); + Debug1(LOG_SPAWN, 0,"Killing npc in spawnmanager.\n"); // Remove NPC and queue for respawn KillNPC(death.deadActor, death.killer); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |