aboutsummaryrefslogtreecommitdiff
path: root/src/server/shared/Logging
AgeCommit message (Collapse)Author
2015-08-21Core/Build: Merge common library and move database out of sharedStormBytePP
2015-08-20Core/Logging: Fixed _maxFileSize being left uninitializedShauren
2015-08-19Build fixesShauren
2015-08-16Core/Build: Removed obsolete SystemConfig.h and made genrev be part of ↵StormBytePP
shared library, which allows cache hits to happen more likely (cherry picked from commit 94f69fb1bcef103392ca27074ebb31ef2ebd27fb)
2015-08-16Add a missing include of d5cf594bfe91ff22175c6e344b23b95cdbcc8a3cDDuarte
(cherry picked from commit 90c9290761ecb7849a036d82c2b93f64920164c6)
2015-08-16Fix build warnings addded in d5cf594bfe91ff22175c6e344b23b95cdbcc8a3cDDuarte
2015-08-16Core/Logging: Refactored appender creation to allow using logging without ↵Shauren
mysql dependency in tools (future task)
2015-07-22Core/Logging: Enable perfect forwarding for logging format and args.Naios
* Handle timestamp parsing though cppformat. * Change a wrong forward -> move
2015-07-21Core/Misc: Fixing warnings detected by Visual Studio 2015 compilerShauren
2015-05-19Core/PacketsIO: Implemented or updated most of party related packets.et65
Packets updated or implemented : - SMSG_INSTANCE_INFO : updated - CMSG_SAVE_CUF_PROFILES : updated - SMSG_LOAD_CUF_PROFILES : updated - SMSG_PARTY_COMMAND_RESULT : updated - CMSG_PARTY_INVITE : updated - SMSG_PARTY_INVITE : updated - CMSG_PARTY_INVITE_RESPONSE : updated - CMSG_PARTY_UNINVITE : updated - SMSG_GROUP_UNINVITE : updated - CMSG_LEAVE_GROUP : updated - SMSG_GROUP_DECLINE : updated - SMSG_GROUP_DESTROYED : updated - CMSG_MINIMAP_PING : updated - SMSG_MINIMAP_PING : updated - CMSG_CONVERT_RAID : updated - CMSG_SET_EVERYONE_IS_ASSISTANT - CMSG_DO_READY_CHECK : updated - CMSG_READY_CHECK_RESPONSE : updated - SMSG_READY_CHECK_COMPLETED : updated - SMSG_READY_CHECK_RESPONSE : updated - SMSG_READY_CHECK_STARTED : updated - CMSG_REQUEST_PARTY_JOIN_UPDATES : implemented (source : sniffs) - CMSG_REQUEST_PARTY_MEMBER_STATE : updated - SMSG_PARTY_MEMBER_STATE : updated - SMSG_PARTY_UPDATE : updated - CMSG_REQUEST_RAID_INFO : updated - CMSG_INITIATE_ROLE_POLL : updated - SMSG_ROLE_POLL_INFORM : updated - CMSG_SET_ROLE : updated - SMSG_ROLE_CHANGED_INFORM : updated - CMSG_CHANGE_SUB_GROUP : updated - CMSG_SWAP_SUB_GROUPS : implemented - CMSG_SET_ASSISTANT_LEADER : updated - CMSG_SET_PARTY_LEADER : updated - SMSG_GROUP_NEW_LEADER : updated - CMSG_CLEAR_RAID_MARKER : implemented - SMSG_RAID_MARKERS_CHANGED : implemented - CMSG_UPDATE_RAID_TARGET : updated - SMSG_SEND_RAID_TARGET_UPDATE_ALL : updated - SMSG_SEND_RAID_TARGET_UPDATE_SINGLE : updated - CMSG_OPT_OUT_OF_LOOT : updated - CMSG_SET_LOOT_METHOD : updated About group update flags: - Not sure they are use for now. - Pets now have their group update flags. - Pets'power is no send to client anymore. - Changes about them are inspired from SMSG_PARTY_MEMBER_STATS parsing of WowPacketParser, but it seems this packet is not use anymore. CHAT_MSG_RAID has been fixed. About Ready check: - Correctly implemented this function. - An update function has been added to Group class, and to GroupMgr class in order to manage the ready check expiration (when 35 seconds were gone, players who have not answered must be reported as AFK) About Raid markers: - Old spell effect SPELL_EFFECT_SUMMON_OBJECT_SLOT3 has been renamed to SPELL_EFFECT_CHANGE_RAID_MARKER and implemented. I'm sure about that because raid markers spells are the only spells that have this effect type. Source: WowPacketParser, and sniffs from official.
2015-04-24Core/Log: Fix newlines when using dynamic log namesNaios
* thanks @Aokromes for reporting * also removes an unnecessary std::move (cherry picked from commit 2592528741a3ce4879c9d5f398e12b37a975cbcf)
2015-04-05Core/Log: Remove some unnecessary std::move's.Naios
* This are r-value references already. * Thanks @Shauren for noticing (cherry picked from commit 85d6ff9570869bce368e9bbcf881755c6c89cb55)
2015-03-28Core/Log: Improve creation of log prefixes.Naios
* this also fixes non whitespace seperated timestamps in logs after 95ebe4f31cba6b4772cfd19 @Aokromes * remove an unnecessary stringstream in Log::outCommand * delete copy constructor of LogMessage to prevent unwanted copies
2015-03-18Core/Log: Readd include of <stdarg.h> to fix compile issues under gccNaios
2015-03-18Merge pull request #14317 from Naios/typesafelogCarbenium
Type safe logging
2015-03-18Shared/Logs: Add support to .server set loglevel command after ↵jackpoz
003d67708b9a279da3d37e5ef06eb32ceab53964 Update the lowest log level when using ".server set loglevel" command. (cherry picked from commit 43f74fd8cfbab8f8fecf128e5d8d5d44ae767988)
2015-03-18Shared/Logs: Improve log performancesjackpoz
Improve Log::ShouldLog() performances by saving the lowest log level across all loggers and discarding any log with lower level than that. (cherry picked from commit 003d67708b9a279da3d37e5ef06eb32ceab53964)
2015-03-13Core/Log: Add type safe formattingNaios
* improves safety and log speed through: - variadic templates - perfect forwarding * fixes a newline in db logs * improve performance of Appender::write by using std::ostringstream && std::move
2015-03-11Core/Log: Fix some issues detected by static analysis.Naios
* Either inefficient or wrong usage of string::find(). string::compare() will be faster if string::find's result is compared with 0, because it will not scan the whole string. If your intention is to check that there are no findings in the string, you should compare with std::string::npos. * C-style pointer casting detected. C++ offers four different kinds of casts as replacements: static_cast, const_cast, dynamic_cast and reinterpret_cast.
2015-01-01Update copyright note for 2015Vincent-Michael
Happy new year
2014-10-08Core/Logging: Replaced direct calls to GetCounter() in logs with ToString()Shauren
2014-08-09Core/Server: Add missing overridesDDuarte
2014-07-21Core: Kill again whitespace :(Vincent-Michael
2014-07-20Core: Fix non pch build (gcc)Vincent-Michael
2014-07-20Refactored singletons to enable proper deconstruction during shutdownleak
2014-07-08Replaced the LogWorker thread with Boost ASIOleak
2014-07-01Replaced all remaining ACE based Singletonsleak
Replaced ACE base AutoPtr class with shared_ptr Note: worldserver currently broken due to MapUpdater threading failure (ACE ofc, what else could it be)
2014-06-30Replaced ACE_Task_Base based LogWorker with ProducerConsumerQueueleak
2014-06-24Revert "Removed ACE dependencies from LogWorker" This actually needs way ↵leak
more work This reverts commit 0a592dd9dbd34818deee472dd42d700b4746a27e.
2014-06-24Removed ACE dependencies from LogWorkerleak
2014-06-23Merge branch 'master' of github.com:TrinityCore/TrinityCore into boostSubv
Conflicts: src/server/authserver/Server/AuthSession.cpp src/server/game/Server/WorldSession.h src/server/shared/Packets/ByteBuffer.cpp src/server/shared/Utilities/Util.h
2014-06-23Fix non-PCH buildleak
2014-06-22Core/Dependencies: Remove ACE_Singleton dependency from the Log and ↵Subv
DelayExecutor classes. Removed an unused function.
2014-06-22Shared/Misc: Removed some more ACE dependenciesSubv
2014-06-22Replaced all ACE_OS::localtime_r callsleak
2014-06-08Replaced dependencies on ace/OS_NS_time.hleak
2014-05-18Revert "Core/Logging: Use logger cache for speed up logger filter search"jackpoz
This reverts commit 39331ea7b9e906b67378a1be6c0c694d264eda3a. This is required to fix a race condition introduced with the logger cache. Adding a locking mechanism might make worthless the speed gain added by the cache itself, push a proper thread-safe implementation if it's worth it. Helgrind log: Possible data race during write of size 8 at 0x736F428 by thread #1 Locks held: none at 0x11872DF: std::_Hashtable<std::string, std::pair<std::string const, Logger const*>, std::allocator<std::pair<std::string const, Logger const*> >, std::__detail::_Select1st, std::equal_to<std::string>, std::hash<std::string>, std::__detail::_Mod_range_hashing, std::__detail::_Default_ranged_hash, std::__detail::_Prime_rehash_policy, std::__detail::_Hashtable_traits<true, false, true> >::_M_insert_bucket_begin(unsigned long, std::__detail::_Hash_node<std::pair<std::string const, Logger const*>, true>*) (hashtable.h:1196) by 0x11865A1: std::_Hashtable<std::string, std::pair<std::string const, Logger const*>, std::allocator<std::pair<std::string const, Logger const*> >, std::__detail::_Select1st, std::equal_to<std::string>, std::hash<std::string>, std::__detail::_Mod_range_hashing, std::__detail::_Default_ranged_hash, std::__detail::_Prime_rehash_policy, std::__detail::_Hashtable_traits<true, false, true> >::_M_insert_unique_node(unsigned long, unsigned long, std::__detail::_Hash_node<std::pair<std::string const, Logger const*>, true>*) (hashtable.h:1342) by 0x1185A48: std::__detail::_Map_base<std::string, std::pair<std::string const, Logger const*>, std::allocator<std::pair<std::string const, Logger const*> >, std::__detail::_Select1st, std::equal_to<std::string>, std::hash<std::string>, std::__detail::_Mod_range_hashing, std::__detail::_Default_ranged_hash, std::__detail::_Prime_rehash_policy, std::__detail::_Hashtable_traits<true, false, true>, true>::operator[](std::string const&) (hashtable_policy.h:496) by 0x1184F3A: std::unordered_map<std::string, Logger const*, std::hash<std::string>, std::equal_to<std::string>, std::allocator<std::pair<std::string const, Logger const*> > >::operator[](std::string const&) (unordered_map.h:596) by 0x1184495: Log::GetLoggerByType(std::string const&) (Log.h:106) by 0x1184527: Log::ShouldLog(std::string const&, LogLevel) (Log.h:112) by 0x16E7121: World::LoadConfigSettings(bool) (World.cpp:909) by 0x16EB623: World::SetInitialWorldSettings() (World.cpp:1276) by 0x118F0EC: Master::Run() (Master.cpp:169) by 0x1196AFF: main (Main.cpp:142) This conflicts with a previous read of size 8 by thread #3 Locks held: none at 0x1186EA6: std::_Hashtable<std::string, std::pair<std::string const, Logger const*>, std::allocator<std::pair<std::string const, Logger const*> >, std::__detail::_Select1st, std::equal_to<std::string>, std::hash<std::string>, std::__detail::_Mod_range_hashing, std::__detail::_Default_ranged_hash, std::__detail::_Prime_rehash_policy, std::__detail::_Hashtable_traits<true, false, true> >::_M_find_before_node(unsigned long, std::string const&, unsigned long) const (hashtable.h:1162) by 0x1186263: std::_Hashtable<std::string, std::pair<std::string const, Logger const*>, std::allocator<std::pair<std::string const, Logger const*> >, std::__detail::_Select1st, std::equal_to<std::string>, std::hash<std::string>, std::__detail::_Mod_range_hashing, std::__detail::_Default_ranged_hash, std::__detail::_Prime_rehash_policy, std::__detail::_Hashtable_traits<true, false, true> >::_M_find_node(unsigned long, std::string const&, unsigned long) const (hashtable.h:604) by 0x11857B9: std::_Hashtable<std::string, std::pair<std::string const, Logger const*>, std::allocator<std::pair<std::string const, Logger const*> >, std::__detail::_Select1st, std::equal_to<std::string>, std::hash<std::string>, std::__detail::_Mod_range_hashing, std::__detail::_Default_ranged_hash, std::__detail::_Prime_rehash_policy, std::__detail::_Hashtable_traits<true, false, true> >::find(std::string const&) (hashtable.h:1025) by 0x1184DE2: std::unordered_map<std::string, Logger const*, std::hash<std::string>, std::equal_to<std::string>, std::allocator<std::pair<std::string const, Logger const*> > >::find(std::string const&) (unordered_map.h:543) by 0x11842EF: Log::GetLoggerByType(std::string const&) (Log.h:84) by 0x1184527: Log::ShouldLog(std::string const&, LogLevel) (Log.h:112) by 0x189AACA: MySQLConnection::Execute(char const*) (MySQLConnection.cpp:175) by 0x18A3225: BasicStatementTask::Execute() (AdhocStatement.cpp:56) Address 0x736F428 is 120 bytes inside a block of size 184 alloc'd at 0x4C2AE3A: operator new(unsigned long, std::nothrow_t const&) (vg_replace_malloc.c:350) by 0x1185046: ACE_Singleton<Log, ACE_Thread_Mutex>::instance() (Singleton.cpp:91) by 0x11968E2: main (Main.cpp:135)
2014-05-18Revert "Core/Logging: store loggers in cache correctly"jackpoz
This reverts commit c6a4d5a1de1c8e9c7722a5a13695d1273b8cbfbc.
2014-05-01Core/Misc: Remove remaining COMPILER_HAS_CPP11_SUPPORT related macrosDehravor
2014-04-08Core/Logging: store loggers in cache correctlyjoschiwald
2014-03-24Core/Logging: Fixed filenames of backup logsShauren
Closes #11765
2014-03-23Fixed build without PCHShauren
2014-02-08Shared/Logs: Code cleanupjackpoz
Remove unneeded check added in 89af6097f37587e178ac412252326351ca655075
2014-02-07Shared/Logs: Make AppenderFile more thread-safejackpoz
In case of dynamic file names don't store the FILE* handle in a shared class variable but keep it only at function scope. Valgrind log: at _IO_un_link (genops.c:69) by fclose@@GLIBC_2.2.5 (iofclose.c:55) by AppenderFile::CloseFile() (AppenderFile.cpp:94) by AppenderFile::_write(LogMessage const&) (AppenderFile.cpp:66) by Appender::write(LogMessage&) (Appender.cpp:102) by Logger::write(LogMessage&) const (Logger.cpp:63) by Log::write(LogMessage*) (Log.cpp:279) by Log::vlog(std::string const&, LogLevel, char const*, __va_list_tag*) (Log.cpp:267) by Log::outMessage(std::string const&, LogLevel, char const*, ...) (Log.h:129) Address 0x2a1bd2d0 is 0 bytes inside a block of size 568 free'd at free (vg_replace_malloc.c:468) by fclose@@GLIBC_2.2.5 (iofclose.c:85) by AppenderFile::CloseFile() (AppenderFile.cpp:94) by AppenderFile::_write(LogMessage const&) (AppenderFile.cpp:66) by Appender::write(LogMessage&) (Appender.cpp:102) by Logger::write(LogMessage&) const (Logger.cpp:63) by Log::write(LogMessage*) (Log.cpp:279) by Log::vlog(std::string const&, LogLevel, char const*, __va_list_tag*) (Log.cpp:267) by Log::outMessage(std::string const&, LogLevel, char const*, ...) (Log.h:129)
2014-02-07Shared/Logs: Add workaround for "w" flag used with dynamic name filesjackpoz
Ignore "w" flag and always use "a" for log files with dynamic name since the file handle is created at every log line and "w" would delete any other logged line from previous _write() calls. The best solution would be to overwrite only at first call and append at any other call.
2014-01-01Update copyright note for 2014.Vincent_Michael
Happy new year.
2013-12-19Core/Logging: Use logger cache for speed up logger filter searchSpp
2013-11-11Core/Logging: Minor changesSpp
- Select stderr when writing ERROR and FATAL messages - Simplify function defines - Fix `logs` table structure with latest logging changes
2013-11-08Core/Logging: Remove LOG_FILTER_XXX defines with it's value (remember logger ↵Spp
names are case-sensitive)
2013-11-08Core/Logs: Create default set of loggers and Appender if the config is wrong.Spp
- Logger root (Error) - Logger server (Info) - Appender Console Logger names are case-sensitive, Appender names are not.