Commit Graph

70 Commits

Author SHA1 Message Date
Nay
e3f7be12ef Servers: Enable UseProcessors and ProcessPriority settings to be used on Linux 2013-07-28 18:58:12 +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
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
Spp
be3826825e Core/Logging: Use correct realmId when logging to DB 2013-01-16 08:59:56 +01:00
Vincent_Michael
cc65aba789 Update copyright note for 2013.
Happy new year.
2013-01-01 00:41:01 +01:00
Shauren
f1170ba0fb Core: Fixed some level 4 warnings (msvc) 2012-12-31 20:43:14 +01:00
Spp
2251d1bfae Core/Misc: Set mode 0644 for files 2012-11-27 13:03:12 +01:00
Shauren
7dc26c7ff7 Core/Misc: Warning fixes 2012-08-21 18:20:42 +02: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
Machiavelli
e95d614f52 Core/Misc: Prevent calling ACE_Task_Base::wait() on an invalid handle. WorldSocketMgr::Wait is already called in WorldRunnable post-service hook 2012-03-28 12:50:02 +02:00
click
6afaed4a02 Core: Remove the MersenneTwiser-library (SFMT is now considered stable enough for full deployment) 2012-03-27 02:27:12 +02:00
Machiavelli
e960016dc4 Partial revert of "Core/DB Layer: Fix a memory leak.", mysql library related stuff. Original memory leak fix is still in place. 2012-03-26 13:33:47 +02:00
Machiavelli
43048afc7e Core/DB Layer: Fix a memory leak. 2012-03-26 08:29:41 +02:00
kaelima
19f821d00a Auth/Realmlist: Make use of RealmFlags and rename color to flag (core- and dbwise)
Also fix connecting with realmflag & 4
2012-03-26 05:14:10 +02:00
leak
4665d5bfc4 Core/DBLayer: Remnant cleanups 2012-03-19 18:09:14 +01:00
leak
178c658363 Core/DBLayer: Convert DirectExecute() queries that are not runtime relevant back to regular queries 2012-03-19 18:09:13 +01:00
click
e615fba7f8 Revert "Core: Fix the SFMT randgen-initbug" - alignment-fix is now properly handled within the respective code
This reverts commit 28310f0938.
2012-02-25 20:39:28 +01:00
Elron103
28310f0938 Core: Fix the SFMT randgen-initbug
Signed-off-by: click <click@gonnamakeyou.com>
2012-02-25 02:16:08 +01:00
leak
ced346076b Merge pull request #4567 from Kiperr/master
Happy new year!
2011-12-31 16:13:28 -08:00
leak
cdbeb42e0f Core/DBLayer: Refactor prepared statement defines to new format (char db) 2012-01-01 01:09:38 +01:00
kiper
8299627ed9 Update headers for 2012. HAPPY NEW YEAR!!! 2012-01-01 00:32:13 +01:00
leak
8adac3f246 Core/DBLayer: Convert PExecute() queries to prepared statements No. 3 2011-12-31 00:32:05 +01:00
Nay
c19a6c7e31 Core/Loading: Drop the field script_version from the table version.
It serves no purpose (and one step closer to remove EAI from the core/db)
2011-10-28 23:00:00 +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
Spp
af05915b9e [Cosmetic] Apply codestyle "XXX * " and "XXX *" changed to "XXX* " (with some exceptions) 2011-09-15 14:12:57 +02:00
click
d7715fa4b8 Buildsystem/Windows: Add support for reading commithash and commitdate directly from the executable binaries.
To view this information, check the "Product Version" field in Properties on the respective daemon.

+ Fix worldserver/authserver .rc file layouts and content (now adheres to MS standards *sighs*)
+ Change .serv info output to show corename followed by the commit date and hash
+ Include showing the versionstring on worldserver startup completion (on Aokromes' request)

Thanks to Paradox for bugging me enough about it and the initial pull-request.
2011-08-04 22:53:33 +02:00
leak
1003f30448 Add spaces after commas 2011-04-29 20:47:02 +02:00
click
6a431f745c Core: get rid of the revision-id once and for all - it's not useful in a DVCS at all 2011-04-28 18:53:23 +02:00
runningnak3d
e196dd80bd Core/WorldServer: Some minor text and code style clean up. 2011-04-12 16:46:37 -04:00
Azazel
37a6fe2ae7 Core/CharDB Cleanup: alter character_battleground_data table making column names lowerCamel and move all queries to prepared statements. 2011-04-08 11:28:10 +06:00
Shocker
2c28d383b3 Core/Master: Use ASSERT to halt server in freeze detector 2011-04-07 13:14:26 +03:00
laly
b9af020e72 Core/Cleanup: Drop some unused code.
Closes #1010, #581, and #248
2011-03-26 03:28:59 +02:00
Shauren
2f79b0f266 Core: Removed all double (and more) empty lines 2011-03-21 10:52:14 +01:00
leak
137b079eea Core: Generic cleanup (tab2spaces/trailing whitespace removal) 2011-01-26 01:03:35 +01: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
bd85914d92 Core/DBLayer: Properly manage mysql library initialization and shutdown in authserver and worldserver. Prevent multiple calls and make it more elegant. 2011-01-13 21:30:37 +01:00
Machiavelli
957c69de83 Update copyright note for 2011.
Happy new year.
2011-01-01 15:01:13 +01:00
Shauren
4e697869a0 Core/World: Set realm status as invalid during startup and online when initialized
--HG--
branch : trunk
2010-12-28 17:56:15 +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
2642894342 Core: Add new system for parallelizing client packet processing. Handle WorldSession updates in Map::Update() where we are safe to proceed. Patch by Ambal.
(And clean up tabs and whitespace while rummaging around in there)
Closes issue 5084.

--HG--
branch : trunk
2010-12-13 22:37:56 +01:00
Machiavelli
f1a73e89b8 Merge
--HG--
branch : trunk
2010-12-13 16:13:32 +01:00
Machiavelli
ea29d87dcc Backed out changeset: 8326a2411148
--HG--
branch : trunk
2010-12-13 09:18:49 +01:00
click
7e0dee8cb1 Fix build
--HG--
branch : trunk
2010-12-10 01:44:34 +01:00
Derex
ef768a8307 Rewrite remote access console using ACE
--HG--
branch : trunk
2010-12-10 01:01:44 +02:00
Machiavelli
f5d6319d4d Core/DBLayer:
- Make the mysql connectionpool shared for async and syncrhonous connections.
- Allow configurable amount of connections for the pool
- Allow configurable amount of delaythreads
Note that delaythreads now only represent in-core threads. Whenever they execute a task they will pick a free connection from the pool instead of using their previously unique assigned connection.
The purpose of this design change is better distribution of SQL requests (no bottlenecks paired with idling) among available resources.
This also prevents a ¨memory waste¨ of preparing async prepared statements on synchronous connections (that were never called) - and vice versa. Now, connections aren´t explicitly async or synchronous, they serve both purposes.

Use at own risk, might cause instabilities.
Don´t forget to update your config files and clear your cmake cache.

--HG--
branch : trunk
2010-12-04 21:50:36 +01:00
silinoron
da4c2339bc Core: Add a warning message for those who are using SFMT for random number generation.
Patch and suggestion by Paradox.

--HG--
branch : trunk
2010-10-27 19:51:41 -07: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