mirror of
https://github.com/mangosfour/server.git
synced 2025-12-18 01:37:01 +00:00
[9836] Make log output code more consistent for diff build modes.
* Make possible have debug output if build in release mode. * But preserver current optimization in avoid debug output args calculation if debug ouput disabled if done using DEBUG_LOG * Implement in same way BASIC_LOG, DETAIL_LOG. Recommended use its instead explicit access to sLog * Use variadic macros for DEBUG_LOG and other new defines. All supported VS/GCC have its support as C++ extension. * Add DEBUG_FILTER_LOG and semilar defines for filered log output and use its. * Also move recent added debug output for transport events under LOG_FILTER_TRANSPORT_MOVES
This commit is contained in:
parent
6726a08b48
commit
6dec6c8a9f
12 changed files with 168 additions and 179 deletions
|
|
@ -412,7 +412,7 @@ class ByteBuffer
|
|||
|
||||
void print_storage() const
|
||||
{
|
||||
if(!sLog.IsOutDebug()) // optimize disabled debug output
|
||||
if (!sLog.HasLogLevelOrHigher(LOG_LVL_DEBUG)) // optimize disabled debug output
|
||||
return;
|
||||
|
||||
sLog.outDebug("STORAGE_SIZE: %lu", (unsigned long)size() );
|
||||
|
|
@ -423,7 +423,7 @@ class ByteBuffer
|
|||
|
||||
void textlike() const
|
||||
{
|
||||
if(!sLog.IsOutDebug()) // optimize disabled debug output
|
||||
if (!sLog.HasLogLevelOrHigher(LOG_LVL_DEBUG)) // optimize disabled debug output
|
||||
return;
|
||||
|
||||
sLog.outDebug("STORAGE_SIZE: %lu", (unsigned long)size() );
|
||||
|
|
@ -434,13 +434,13 @@ class ByteBuffer
|
|||
|
||||
void hexlike() const
|
||||
{
|
||||
if(!sLog.IsOutDebug()) // optimize disabled debug output
|
||||
if (!sLog.HasLogLevelOrHigher(LOG_LVL_DEBUG)) // optimize disabled debug output
|
||||
return;
|
||||
|
||||
uint32 j = 1, k = 1;
|
||||
sLog.outDebug("STORAGE_SIZE: %lu", (unsigned long)size() );
|
||||
|
||||
if(sLog.IsIncludeTime())
|
||||
if (sLog.IsIncludeTime())
|
||||
sLog.outDebugInLine(" ");
|
||||
|
||||
for(uint32 i = 0; i < size(); ++i)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue