Commit Graph

43 Commits

Author SHA1 Message Date
leak
2f28f4ce75 Fixed FreezeDetectorHandler trigger time 2014-07-08 21:17:24 +02:00
leak
d1594998f8 Replaced the LogWorker thread with Boost ASIO 2014-07-08 20:55:25 +02:00
leak
a738cd96dc Renamed WorldTcpSession back to WorldSocket 2014-07-07 22:03:41 +02:00
leak
c7d5660e99 Readd support for TCP_NODELAY socket option 2014-07-07 21:37:55 +02:00
Subv
eeb2720401 Removed some dead code 2014-07-06 19:05:13 -05:00
leak
59c8ffe4b3 Change the freeze detector thread to be a periodic callback running on the thread pool 2014-07-06 23:04:38 +02:00
leak
7befb26625 Some groundwork for replacing the ACE based WorldSocket handling 2014-07-06 01:26:29 +02:00
leak
021e18d152 Refactored both world and auth main
- Master/Worldrunable removed
- World Update loop now running on main (which was doing nothing before)
- Processpriority moved to shared
- Added a preliminary thread pool for boost::asio::io_service
2014-07-04 15:22:06 +02:00
leak
310f5e6846 Some ground work for ASIO based RemoteAccess handling 2014-07-02 17:38:44 +02:00
Vincent_Michael
20004050bc Update copyright note for 2014.
Happy new year.
2014-01-01 00:07:53 +01:00
Spp
94e2b9332a Core/Logging: Remove LOG_FILTER_XXX defines with it's value (remember logger names are case-sensitive) 2013-11-08 10:50:51 +01:00
Nay
f71d894a21 Servers: Fix some code style issues in world and authserver 2013-07-28 16:59:07 +01:00
Shauren
779a59e7e2 Core/Config: Refactored ConfigMgr
* Loading initial configuration files is now separate from loading any additional custom configs
2013-07-15 17:31:44 +02:00
Shauren
86d846e627 Core: Fixed windows compile 2013-05-13 18:10:20 +02:00
Spp
d1677b2db0 Core/Logging: Performance-related tweaks to logging system
All sLog->out* functions (except outCommand atm) are replaced with TC_LOG_* macros.
    Memleak fix
2013-05-13 15:07:36 +02:00
Nefarion
49fd11ab5a First step of comment style refactoring to doxygen-style. 2013-03-08 21:55:37 +01:00
Vincent_Michael
cc65aba789 Update copyright note for 2013.
Happy new year.
2013-01-01 00:41:01 +01:00
Spp
2251d1bfae Core/Misc: Set mode 0644 for files 2012-11-27 13:03:12 +01:00
Spp
1e50a08604 Core/Logging: Fix PlayerDump logging 2012-10-22 10:37:39 +02:00
Nay
b89b8ff277 Core/Loading: Change info/error messages to printf when config is not loaded 2012-08-29 20:02:55 +01:00
Spp
55ce180f28 Core/Logging: Add Asyncronous logging with Loggers ("What to log") and Appenders ("Where to log") system. Will allow to select to full log some parts of core while others are not even logged.
- Logging System is asyncronous to improve performance.
- Each msg and Logger has a Log Type and Log Level assigned. Each msg is assigned the Logger of same Log Type or "root" Logger is selected if there is no Logger configured for the given Log Type
- Loggers have a list of Appenders to send the msg to. The Msg in the Logger is not sent to Appenders if the msg LogLevel is lower than Logger LogLevel.
- There are three (at the moment) types of Appenders: Console, File or DB (this is WIP, not working ATM). Msg is not written to the resource if msg LogLevel is lower than Appender LogLevel.
- Appender and Console Log levels can be changed while server is active with command '.set loglevel (a/l) name level'

Explanation of use with Sample config:

Appender.Console.Type=1       (1 = Console)
Appender.Console.Level=2      (2 = Debug)

Appender.Server.Type=2        (2 = File)
Appender.Server.Level=3       (3 = Info)
Appender.Server.File=Server.log

Appender.SQL.Type=2           (2 = File)
Appender.SQL.Level=1          (1 = Trace)
Appender.SQL.File=sql.log

Appenders=Console Server      (NOTE: SQL has not been included here... that will make core ignore the config for "SQL" as it's not in this list)

Logger.root.Type=0            (0 = Default - if it's not created by config, server will create it with LogLevel = DISABLED)
Logger.root.Level=5           (5 = Error)
Logger.root.Appenders=Console

Logger.SQL.Type=26            (26 = SQL)
Logger.SQL.Level=3            (2 = Debug)
Logger.SQL.Appenders=Console Server SQL

Logger.SomeRandomName.Type=24 (24 = Guild)
Logger.SomeRandomName.Level=5 (5 = Error)
Loggers=root SQL SomeRandomName

* At loading Appender SQL will be ignored, as it's not present on "Appenders"

* sLog->outDebug(LOG_FILTER_GUILD, "Some log msg related to Guilds")
  - Msg is sent to Logger of Type LOG_FILTER_GUILD (24). Logger with name SomeRandomName is found but it's LogLevel = 5 and Msg LogLevel=2... Msg is not logged

* sLog->outError(LOG_FILTER_GUILD, "Some error log msg related to Guilds")
  - Msg is sent to Logger of Type LOG_FILTER_GUILD (24). Logger with name SomeRandomeName is found with proper LogLevel but Logger does not have any Appenders assigned to that logger... Msg is not logged

* sLog->outDebug(LOG_FILTER_SQL, "Some msg related to SQLs")
  - Msg is sent to Logger SQL (matches type), as it matches LogLevel the msg is sent to Appenders Console, Server and SQL
    - Appender Console has lower Log Level: Msg is logged to Console
    - Appender Server has higher Log Level: Msg is not logged to file
    - Appender SQL has lower Log Level: Msg is logged to file sql.log

* sLog->outDebug(LOG_FILTER_BATTLEGROUND, "Some msg related to Battelgrounds")
  - Msg is sent to Logger root (Type 0) as no Logger was found with Type LOG_FILTER_BATTLEGROUND (13). As Logger has higher LogLevel msg is not sent to any appender

* sLog->outError(LOG_FILTER_BATTLEGROUND, "Some error msg related to Battelgrounds")
  - Msg is sent to Logger root (Type 0) as no Logger was found with Type LOG_FILTER_BATTLEGROUND (13). Msg has lower LogLevel and is sent to Appender Console
    - Appender Console has lower LogLevel: Msg is logged to Console
2012-08-03 14:20:18 +02:00
click
409ebcca97 Core: Send SSL and ACE version in all logging detailmodes, not just when set in the config 2012-03-31 23:50:32 +02:00
kiper
8299627ed9 Update headers for 2012. HAPPY NEW YEAR!!! 2012-01-01 00:32:13 +01:00
Nay
8ca09a2061 Revert file Main.cpp that shouldn't have been change in accae0ce50 (previous commit) 2011-10-29 00:48:49 +01:00
Nay
accae0ce50 TDB 335.11.43
Move SQL updates to the directory old.
2011-10-29 00:20:56 +01:00
Spp
b16d2245bb Cosmetic: Multiple cosmetic changes
- Added missing space to 'if', 'for', 'while' and 'switch' when it's followed by '('
- Added missing space after a comma and remove space before comma (with some exceptions)
- Remove trailing spaces
- Convert tab to spaces

Note: Only affects files with extension "cpp" and "h" under /src/server
2011-09-29 12:43:05 +02:00
Spp
be12603150 Configuration/ConfigMgr: converted from singleton to namespace with free functions. 2011-09-28 13:00:43 +02:00
leak
1003f30448 Add spaces after commas 2011-04-29 20:47:02 +02:00
runningnak3d
e196dd80bd Core/WorldServer: Some minor text and code style clean up. 2011-04-12 16:46:37 -04:00
Machiavelli
52cd2cbd7e Core/Maps: Unload transports in MapManager::UnloadAll instead of singleton destructor.
Core/Transports: Properly delink units from transports on transport desutruction. - Thanks to Shauren for help.
Core/ObjectAccessor: Unload corpse 'storage' in added UnloadAll method called in WorldRunnable postservice hook.
Core/Master: Change some postservice queries to syncrhonous (direct) execution to ensure execution on shutdown
Core/Master: Remove redundant calls to ACE::init and ACE::fini

These changes were made to fix crash/freeze issues on shutdown.
2011-01-16 00:08:52 +01:00
Machiavelli
957c69de83 Update copyright note for 2011.
Happy new year.
2011-01-01 15:01:13 +01:00
Shauren
928443d899 Core: Removed more operator workarounds for ACE_Singleton (missed previously because of inconsistent naming)
--HG--
branch : trunk
2010-12-23 23:25:44 +01:00
click
f0c4241ea4 Remove the accidental additions of CRLF-crap from the header updates
--HG--
branch : trunk
2010-10-07 15:35:36 +02:00
click
8ea4b32fab Update copyright headers (following the same standard in all files = good)
--HG--
branch : trunk
2010-10-07 12:41:56 +02:00
Machiavelli
0117af4c37 Core/DBLayer:
- Implement deriviate classes of MySQLConnection for every database type (world, realm, characters)
- Make DatabaseWorkerPool templatized and use the above mentioned classes as parameter
- Implementation of the new types in code
(This is in preparation of prepared statement interface)

--HG--
branch : trunk
2010-09-02 17:47:50 +02:00
Machiavelli
2a57bc9cdc - Fix potential singleton memory deallocation problems
- Fix ¨mysql_global_end() 1 thread didn´t exit¨ error
Author: Derex

--HG--
branch : trunk
2010-08-23 18:15:01 +02:00
click
b118ab2356 remove ANSI escape codes from auth/worldserver error-output since it doesn't work on MS-based OS'es *sighs*
--HG--
branch : trunk
2010-07-29 17:15:03 +02:00
click
969bf213b8 Fix windows-build and change some warnings if configuration-files can not be read properly
- Add proper warning about missing [authserver] -tag in authserver configuration file if not found.
- Add proper warning about missing [worldserver] -tag in worldserver configuration file if not found.
Thanks to Qaston for finding the redefininition of strdup!

--HG--
branch : trunk
2010-07-29 09:00:55 +02:00
click
3296a944e7 Convert to using ACE for reading configurationfiles, and remove dependency on dotconfpp configuration library and related files
(patch by astellar - and a thankyou to vladimir for being a russian teddybear)

--HG--
branch : trunk
2010-07-29 01:22:45 +02:00
Xanadu
ffaffe3fd7 * Renamed several VS projects and the executables they produce to reflect the new naming convention.
* Cleaned up some useless and redundant preprocessor definitions.
* Fixed the win build so that it correctly uses the mysql lib it built from the sources.
* Note that you still need to use 8615_mysql_openssl_libs.zip for the OpenSSL binaries.
* Also note that Win x64 build from the existing VS files is still fubar (mysql lib...).

--HG--
branch : trunk
2010-06-23 01:47:41 +02:00
Shauren
61bc0dce35 Fixed windows compile for game and TrinityCore
NOTE: config renamed from TrinityCore.conf to worldserver.conf

--HG--
branch : trunk
2010-06-10 19:22:53 +02:00
Tartalo
726a76e93a Some cmake fixes for worldserver
--HG--
branch : trunk
2010-06-08 01:34:51 +02:00
click
fd28bc6aff rename world server directory (trinitycore) to worldserver, rename authserver directory (trinityrealm) to authserver to reflect their real purposes
--HG--
branch : trunk
rename : src/server/trinityrealm/AuthCodes.cpp => src/server/authserver/AuthCodes.cpp
rename : src/server/trinityrealm/AuthCodes.h => src/server/authserver/AuthCodes.h
rename : src/server/trinityrealm/AuthSocket.cpp => src/server/authserver/AuthSocket.cpp
rename : src/server/trinityrealm/AuthSocket.h => src/server/authserver/AuthSocket.h
rename : src/server/trinityrealm/CMakeLists.txt => src/server/authserver/CMakeLists.txt
rename : src/server/trinityrealm/Main.cpp => src/server/authserver/Main.cpp
rename : src/server/trinityrealm/RealmAcceptor.h => src/server/authserver/RealmAcceptor.h
rename : src/server/trinityrealm/RealmList.cpp => src/server/authserver/RealmList.cpp
rename : src/server/trinityrealm/RealmList.h => src/server/authserver/RealmList.h
rename : src/server/trinityrealm/RealmSocket.cpp => src/server/authserver/RealmSocket.cpp
rename : src/server/trinityrealm/RealmSocket.h => src/server/authserver/RealmSocket.h
rename : src/server/trinityrealm/TrinityRealm.ico => src/server/authserver/TrinityRealm.ico
rename : src/server/trinityrealm/TrinityRealm.rc => src/server/authserver/TrinityRealm.rc
rename : src/server/trinityrealm/resource.h => src/server/authserver/resource.h
rename : src/server/trinityrealm/trinityrealm.conf.dist => src/server/authserver/trinityrealm.conf.dist
rename : src/server/trinitycore/CMakeLists.txt => src/server/worldserver/CMakeLists.txt
rename : src/server/trinitycore/CliRunnable.cpp => src/server/worldserver/CliRunnable.cpp
rename : src/server/trinitycore/CliRunnable.h => src/server/worldserver/CliRunnable.h
rename : src/server/trinitycore/Main.cpp => src/server/worldserver/Main.cpp
rename : src/server/trinitycore/Master.cpp => src/server/worldserver/Master.cpp
rename : src/server/trinitycore/Master.h => src/server/worldserver/Master.h
rename : src/server/trinitycore/RASocket.cpp => src/server/worldserver/RASocket.cpp
rename : src/server/trinitycore/RASocket.h => src/server/worldserver/RASocket.h
rename : src/server/trinitycore/TrinityCore.ico => src/server/worldserver/TrinityCore.ico
rename : src/server/trinitycore/TrinityCore.rc => src/server/worldserver/TrinityCore.rc
rename : src/server/trinitycore/WorldRunnable.cpp => src/server/worldserver/WorldRunnable.cpp
rename : src/server/trinitycore/WorldRunnable.h => src/server/worldserver/WorldRunnable.h
rename : src/server/trinitycore/resource.h => src/server/worldserver/resource.h
rename : src/server/trinitycore/trinitycore.conf.dist => src/server/worldserver/trinitycore.conf.dist
2010-06-05 22:44:53 +02:00