Commit Graph

29 Commits

Author SHA1 Message Date
Vincent-Michael
9506fd77fc Core: Fix warnings vs2014 ctp (no support) 2014-07-14 01:07:54 +02:00
Shauren
8eeec647d1 Fixed build without pch 2014-05-17 21:35:39 +02:00
Shauren
a62f95e4c2 Core/Calendar: Use single database transaction for adding multiple invites when creating new event 2014-05-17 21:02:01 +02:00
jackpoz
88a5d01016 Core/Calendar: Crash fix
Attempt to fix #11512 crash by adding a NULL check since GetEvent() can return NULL.
2014-01-25 21:28:01 +01:00
Vincent_Michael
20004050bc Update copyright note for 2014.
Happy new year.
2014-01-01 00:07:53 +01:00
jackpoz
1c0903e286 Core/Misc: Fix some static analysis issues
Fix some static analysis issues about uninitialized values. Most of them are false positives, always initialized before being accessed, while some of them are real issues spotted by valgrind too.
2013-12-14 18:41:26 +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
leguybrush
0a308144a8 Core/Code: Unify [more] codestyle for brackets: )\n{\n} to ) { }. 2013-10-28 14:36:07 -04:00
Shauren
695c8cd7b4 Core/Misc: Another batch of fixes for issues found by static analysis 2013-05-19 11:31:17 +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
49b609d2e4 Core/Calendar: Fix mem leak and minor cosmetic changes 2013-02-23 19:18:09 +01:00
Spp
802657250c Core/Misc: Apply codestyle to multiple files 2013-01-14 09:50:59 +01:00
Vincent_Michael
cc65aba789 Update copyright note for 2013.
Happy new year.
2013-01-01 00:41:01 +01:00
Spp
7bef4ce401 Core/Misc: Reduce header dependencies - Step III 2012-11-20 15:03:56 +01:00
horn
4a86b83cb6 Core/Calendar: Minor change. 2012-11-19 22:28:53 +01:00
Spp
bf8b642a47 Fix compile without PCH (Also added some minor changes to minimize differences with 4.3.4) 2012-11-19 12:02:33 +01:00
horn
771aafc499 Core/Calendar: Completely rewrite and fix most of the calendar system
There are still some issues that need to be fixed, for more info see CalendarHandler.cpp TODO part.
Some unblizzlike behaviour possible, we don't have a lot of sniffs.
Big thanks to @Warpten, he joined my project and helped a lot.

IMPORTANT NOTE: Read / append packed time functions in ByteBuffer.h are not correct, they need to be fixed in order to have event times accurate

Signed-off-by: Nay <dnpd.dd@gmail.com>
2012-11-18 22:42:28 +00: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
kaelima
dbe8034ec2 Core/Calendar: Fix crash when deleting an event on the calendar. Should also stop the error message from appearing.
Thanks elecyb
Closes #6570

- Corrected some code from 66d42b4f29
2012-05-23 16:37:22 +02:00
Shauren
1dde22394c Core: Corrected conflicting variable names 2012-03-14 00:21:46 +01:00
kaelima
394dbf0cdc Core/Misc: Fix a crash in CalendarMgr::AddAction and initialize some wild pointers. 2012-03-02 12:23:16 +01:00
Spp
3e622ee7ac Core: Minor cleanup in ObjectMgr and warning fixes 2012-02-27 11:08:34 +01:00
Nay
ad78d44da8 Core/Calendar: Change (revert) CalendarFlags vars to ints
P.S I'd like to have type safe enums (C#-like, also [Flags] attr)
2012-02-25 04:16:17 +00:00
Nay
d6c0a67a7c Core/Calendar:
- Fix build
- Use enums where possible
- Renaming
2012-02-25 04:00:32 +00:00
Shauren
8945d115b2 Core/Calendar: Added some checks & error responses for calendar actions, many more to do still 2012-02-25 00:14:39 +01:00
Shauren
0e86b3a578 Core/Calendar: Corrected structure of SMSG_CALENDAR_COMMAND_RESULT 2012-02-24 23:40:06 +01:00
Shauren
ae5ecb6ac0 Core/Calendar: Code refactoring/removed obsolete functions 2012-02-24 22:04:29 +01:00
Spp
32eab3dca7 Core/Calendar: WIP Calendar. 2012-02-24 20:11:29 +01:00
Nay
c4b6dc3a15 Core/Calendar: Initial work for calendar
Original author: Silinoron
(from calendar branch)
2012-02-24 16:46:29 +00:00