Permalink
Browse files

Logging part 3

  • Loading branch information...
1 parent 68b167f commit 2bf10763eb90a0fecc7377a82e1d6ae025374d3e @TimePath TimePath committed with Kangz Jan 21, 2016
Showing with 671 additions and 762 deletions.
  1. +2 −2 daemon/src/common/cm/cm_load.cpp
  2. +1 −1 daemon/src/common/cm/cm_patch.cpp
  3. +1 −1 daemon/src/common/cm/cm_plane.cpp
  4. +2 −2 daemon/src/common/cm/cm_trisoup.cpp
  5. +4 −4 daemon/src/engine/botlib/bot_load.cpp
  6. +1 −1 daemon/src/engine/botlib/bot_nav.cpp
  7. +16 −16 daemon/src/engine/botlib/bot_nav_edit.cpp
  8. +15 −15 daemon/src/engine/client/cin_ogm.cpp
  9. +3 −3 daemon/src/engine/client/cl_avi.cpp
  10. +5 −5 daemon/src/engine/client/cl_cgame.cpp
  11. +1 −1 daemon/src/engine/client/cl_cin.cpp
  12. +2 −2 daemon/src/engine/client/cl_console.cpp
  13. +8 −8 daemon/src/engine/client/cl_input.cpp
  14. +52 −52 daemon/src/engine/client/cl_irc.cpp
  15. +14 −14 daemon/src/engine/client/cl_keys.cpp
  16. +58 −58 daemon/src/engine/client/cl_main.cpp
  17. +10 −10 daemon/src/engine/client/cl_parse.cpp
  18. +1 −1 daemon/src/engine/client/dl_main.cpp
  19. +1 −1 daemon/src/engine/framework/CommonVMServices.cpp
  20. +1 −1 daemon/src/engine/framework/CvarSystem.cpp
  21. +2 −2 daemon/src/engine/framework/System.cpp
  22. +10 −10 daemon/src/engine/framework/VirtualMachine.cpp
  23. +1 −1 daemon/src/engine/null/null_client.cpp
  24. +2 −2 daemon/src/engine/qcommon/cmd.cpp
  25. +36 −90 daemon/src/engine/qcommon/common.cpp
  26. +14 −14 daemon/src/engine/qcommon/files.cpp
  27. +0 −7 daemon/src/engine/qcommon/logging.h
  28. +34 −34 daemon/src/engine/qcommon/msg.cpp
  29. +10 −10 daemon/src/engine/qcommon/net_chan.cpp
  30. +52 −52 daemon/src/engine/qcommon/net_ip.cpp
  31. +4 −4 daemon/src/engine/qcommon/parse.cpp
  32. +3 −3 daemon/src/engine/qcommon/print_translated.h
  33. +1 −1 daemon/src/engine/qcommon/q_shared.cpp
  34. +2 −3 daemon/src/engine/qcommon/qcommon.h
  35. +6 −6 daemon/src/engine/qcommon/translation.cpp
  36. +1 −1 daemon/src/engine/renderer/gl_shader.cpp
  37. +2 −2 daemon/src/engine/renderer/tr_init.cpp
  38. +1 −1 daemon/src/engine/renderer/tr_model.cpp
  39. +2 −2 daemon/src/engine/renderer/tr_shader.cpp
  40. +2 −2 daemon/src/engine/renderer/tr_skin.cpp
  41. +23 −23 daemon/src/engine/server/sv_ccmds.cpp
  42. +20 −20 daemon/src/engine/server/sv_client.cpp
  43. +3 −3 daemon/src/engine/server/sv_init.cpp
  44. +23 −23 daemon/src/engine/server/sv_main.cpp
  45. +1 −1 daemon/src/engine/server/sv_sgame.cpp
  46. +1 −1 daemon/src/engine/server/sv_snapshot.cpp
  47. +1 −1 daemon/src/engine/sys/con_tty.cpp
  48. +8 −8 daemon/src/engine/sys/sdl_glimp.cpp
  49. +19 −19 daemon/src/engine/sys/sdl_input.cpp
  50. +1 −1 src/cgame/cg_beacon.cpp
  51. +4 −4 src/cgame/cg_buildable.cpp
  52. +4 −4 src/cgame/cg_consolecmds.cpp
  53. +2 −2 src/cgame/cg_event.cpp
  54. +3 −3 src/cgame/cg_gameinfo.cpp
  55. +1 −13 src/cgame/cg_main.cpp
  56. +1 −1 src/cgame/cg_minimap.cpp
  57. +2 −2 src/cgame/cg_parseutils.cpp
  58. +22 −22 src/cgame/cg_players.cpp
  59. +1 −1 src/cgame/cg_rocket.cpp
  60. +2 −2 src/cgame/cg_rocket_draw.cpp
  61. +2 −2 src/cgame/cg_rocket_events.cpp
  62. +3 −3 src/cgame/cg_servercmds.cpp
  63. +12 −12 src/cgame/cg_weapons.cpp
  64. +1 −1 src/cgame/rocket/lua/Timer.cpp
  65. +4 −9 src/cgame/rocket/rocket.cpp
  66. +1 −1 src/cgame/rocket/rocketKeyBinder.h
  67. +4 −4 src/cgame/rocket/rocket_datagrid.cpp
  68. +2 −2 src/sgame/sg_bot_nav.cpp
  69. +8 −8 src/sgame/sg_buildable.cpp
  70. +1 −1 src/sgame/sg_client.cpp
  71. +3 −3 src/sgame/sg_cm_world.cpp
  72. +0 −12 src/sgame/sg_main.cpp
  73. +2 −2 src/sgame/sg_momentum.cpp
  74. +1 −1 src/sgame/sg_spawn.cpp
  75. +1 −1 src/sgame/sg_utils.cpp
  76. +2 −2 src/sgame/sg_weapon.cpp
  77. +13 −13 src/shared/bg_misc.cpp
  78. +35 −35 src/shared/bg_parse.cpp
  79. +25 −25 src/shared/bg_pmove.cpp
  80. +4 −4 src/shared/bg_slidemove.cpp
  81. +2 −2 src/shared/bg_teamprogress.cpp
  82. +20 −20 src/shared/bg_voice.cpp
@@ -659,7 +659,7 @@ static void CMod_CreateBrushSideWindings()
totalEdges += brush->numEdges;
}
- cmLog.Debug( "Allocated %d bytes for %d collision map edges...\n", totalEdgesAlloc, totalEdges );
+ cmLog.Debug( "Allocated %d bytes for %d collision map edges...", totalEdgesAlloc, totalEdges );
}
/*
@@ -909,7 +909,7 @@ void CM_LoadMap(Str::StringRef name)
{
dheader_t header;
- cmLog.Debug( "CM_LoadMap(%s)\n", name);
+ cmLog.Debug( "CM_LoadMap(%s)", name);
std::string mapFile = "maps/" + name + ".bsp";
std::string mapData;
@@ -552,7 +552,7 @@ static void CM_SetBorderInward( cFacet_t *facet, cGrid_t *grid,
else
{
// bisecting side border
- cmLog.Debug( "WARNING: CM_SetBorderInward: mixed plane sides\n" );
+ cmLog.Debug( "WARNING: CM_SetBorderInward: mixed plane sides" );
facet->borderInward[ k ] = false;
if ( !debugBlock )
@@ -621,7 +621,7 @@ void CM_AddFacetBevels( cFacet_t *facet )
if ( !w2 )
{
- cmLog.Debug( "WARNING: CM_AddFacetBevels... invalid bevel\n" );
+ cmLog.Debug( "WARNING: CM_AddFacetBevels... invalid bevel" );
continue;
}
else
@@ -175,7 +175,7 @@ static void CM_SetBorderInward( cFacet_t *facet, cTriangleSoup_t *triSoup, int i
else
{
// bisecting side border
- cmLog.Debug( "WARNING: CM_SetBorderInward: mixed plane sides\n" );
+ cmLog.Debug( "WARNING: CM_SetBorderInward: mixed plane sides" );
facet->borderInward[ k ] = false;
}
}
@@ -342,7 +342,7 @@ cSurfaceCollide_t *CM_GenerateTriangleSoupCollide( int numVertexes, vec3_t *vert
sc->bounds[ 1 ][ 1 ] += 1;
sc->bounds[ 1 ][ 2 ] += 1;
- cmLog.Debug( "CM_GenerateTriangleSoupCollide: %i planes %i facets\n", sc->numPlanes, sc->numFacets );
+ cmLog.Debug( "CM_GenerateTriangleSoupCollide: %i planes %i facets", sc->numPlanes, sc->numFacets );
return sc;
}
@@ -163,7 +163,7 @@ bool BotLoadNavMesh( const char *filename, NavData_t &nav )
Cvar_VariableStringBuffer( "mapname", mapname, sizeof( mapname ) );
Cvar_VariableStringBuffer( "fs_game", gameName, sizeof( gameName ) );
Com_sprintf( filePath, sizeof( filePath ), "maps/%s-%s.navMesh", mapname, filename );
- Com_Printf( " loading navigation mesh file '%s'...\n", filePath );
+ Log::Notice( " loading navigation mesh file '%s'...", filePath );
int len = FS_FOpenFileRead( filePath, &f, true );
@@ -388,7 +388,7 @@ bool BotSetupNav( const botClass_t *botClass, qhandle_t *navHandle )
if ( numNavData == MAX_NAV_DATA )
{
- Com_Printf( "^3ERROR: maximum number of navigation meshes exceeded\n" );
+ Log::Warn( "maximum number of navigation meshes exceeded" );
return false;
}
@@ -406,14 +406,14 @@ bool BotSetupNav( const botClass_t *botClass, qhandle_t *navHandle )
if ( !nav->query )
{
- Com_Printf( "Could not allocate Detour Navigation Mesh Query for navmesh %s\n", filename );
+ Log::Notice( "Could not allocate Detour Navigation Mesh Query for navmesh %s", filename );
BotShutdownNav();
return false;
}
if ( dtStatusFailed( nav->query->init( nav->mesh, maxNavNodes->integer ) ) )
{
- Com_Printf( "Could not init Detour Navigation Mesh Query for navmesh %s\n", filename );
+ Log::Notice( "Could not init Detour Navigation Mesh Query for navmesh %s", filename );
BotShutdownNav();
return false;
}
@@ -116,7 +116,7 @@ void BotSetNavMesh( int botClientNum, qhandle_t nav )
{
if ( nav < 0 || nav >= numNavData )
{
- Com_Printf( "^3ERROR: Navigation handle out of bounds\n" );
+ Log::Warn( "Navigation handle out of bounds" );
return;
}
@@ -171,17 +171,17 @@ void Cmd_NavEdit()
{
int argc = Cmd_Argc();
const char *arg = nullptr;
- const char usage[] = "Usage: navedit enable/disable/save <navmesh>\n";
+ const char usage[] = "Usage: navedit enable/disable/save <navmesh>";
if ( !Cvar_VariableIntegerValue( "sv_cheats" ) )
{
- Com_Printf( "navedit only available in local devmap\n" );
+ Log::Notice( "navedit only available in local devmap" );
return;
}
if ( argc < 2 )
{
- Com_Printf( "%s", usage );
+ Log::Notice( "%s", usage );
return;
}
@@ -192,7 +192,7 @@ void Cmd_NavEdit()
int i;
if ( argc < 3 )
{
- Com_Printf( "%s", usage );
+ Log::Notice( "%s", usage );
return;
}
@@ -208,7 +208,7 @@ void Cmd_NavEdit()
if ( i == numNavData )
{
- Com_Printf( "\'%s\' is not a valid navmesh name\n", arg );
+ Log::Notice( "\'%s\' is not a valid navmesh name", arg );
return;
}
@@ -234,20 +234,20 @@ void Cmd_NavEdit()
}
else
{
- Com_Printf( "%s", usage );
+ Log::Notice( "%s", usage );
}
}
void Cmd_AddConnection()
{
const char usage[] = "Usage: addcon start <dir> (radius)\n"
- " addcon end\n";
+ " addcon end";
const char *arg = nullptr;
int argc = Cmd_Argc();
if ( argc < 2 )
{
- Com_Printf( "%s", usage );
+ Log::Notice( "%s", usage );
return;
}
@@ -262,7 +262,7 @@ void Cmd_AddConnection()
if ( argc < 3 )
{
- Com_Printf( "%s", usage );
+ Log::Notice( "%s", usage );
return;
}
@@ -278,7 +278,7 @@ void Cmd_AddConnection()
}
else
{
- Com_Printf( "Invalid argument for direction, specify oneway or twoway\n" );
+ Log::Notice( "Invalid argument for direction, specify oneway or twoway" );
return;
}
@@ -337,7 +337,7 @@ void Cmd_AddConnection()
}
else
{
- Com_Printf( "%s", usage );
+ Log::Notice( "%s", usage );
}
}
@@ -357,7 +357,7 @@ static void adjustConnectionSize( int dir )
if ( newConnectionSize != connectionSize )
{
connectionSize = newConnectionSize;
- Com_Printf( "Default connection size = %d\n", connectionSize );
+ Log::Notice( "Default connection size = %d", connectionSize );
}
}
@@ -373,19 +373,19 @@ void Cmd_ConnectionSizeDown()
void Cmd_NavTest()
{
- const char usage[] = "Usage: navtest shownodes/hidenodes/showportals/hideportals/startpath/endpath\n";
+ const char usage[] = "Usage: navtest shownodes/hidenodes/showportals/hideportals/startpath/endpath";
const char *arg = nullptr;
int argc = Cmd_Argc();
if ( !cmd.enabled )
{
- Com_Printf( "%s", "Can't test navmesh without enabling navedit" );
+ Log::Notice( "%s", "Can't test navmesh without enabling navedit" );
return;
}
if ( argc < 2 )
{
- Com_Printf( "%s", usage );
+ Log::Notice( "%s", usage );
return;
}
@@ -439,7 +439,7 @@ void Cmd_NavTest()
}
else
{
- Com_Printf( "%s", usage );
+ Log::Notice( "%s", usage );
}
}
@@ -349,7 +349,7 @@ static int loadVideoFrameTheora()
if ( yWShift < 0 || uvWShift < 0 || yHShift < 0 || uvHShift < 0 )
{
- Com_Printf( "[Theora] unexpected resolution in a YUV frame\n" );
+ Log::Notice( "[Theora] unexpected resolution in a YUV frame\n" );
r = -1;
}
else
@@ -522,7 +522,7 @@ int Cin_OGM_Init( const char *filename )
if ( g_ogm.ogmFile )
{
- Com_Printf( S_WARNING "there is already an OGM running, which will be stopped before starting %s\n", filename );
+ Log::Warn( "there is already an OGM running, which will be stopped before starting %s", filename );
Cin_OGM_Shutdown();
}
@@ -532,7 +532,7 @@ int Cin_OGM_Init( const char *filename )
if ( !g_ogm.ogmFile )
{
- Com_Printf( S_WARNING "Can't open OGM file for reading (%s)\n", filename );
+ Log::Warn( "Can't open OGM file for reading (%s)", filename );
return -1;
}
@@ -549,7 +549,7 @@ int Cin_OGM_Init( const char *filename )
//FIXME? better way to find audio stream
if ( g_ogm.os_audio.serialno )
{
- Com_Printf( S_WARNING "more than one audio stream in OGM file(%s). We will stay at the first one\n", filename );
+ Log::Warn( "more than one audio stream in OGM file(%s). We will stay at the first one", filename );
}
else
{
@@ -562,7 +562,7 @@ int Cin_OGM_Init( const char *filename )
{
if ( g_ogm.os_video.serialno )
{
- Com_Printf( S_WARNING "more than one video stream in OGM file(%s). We will stay at the first one\n", filename );
+ Log::Warn( "more than one video stream in OGM file(%s). We will stay at the first one", filename );
}
else
{
@@ -581,13 +581,13 @@ int Cin_OGM_Init( const char *filename )
if ( !g_ogm.os_audio.serialno )
{
- Com_Printf( S_WARNING "Didn't find a Vorbis audio stream in %s\n", filename );
+ Log::Warn( "Didn't find a Vorbis audio stream in %s", filename );
return -2;
}
if ( !g_ogm.os_video.serialno )
{
- Com_Printf( S_WARNING "Haven't found a video stream in OGM file (%s)\n", filename );
+ Log::Warn( "Haven't found a video stream in OGM file (%s)", filename );
return -3;
}
@@ -602,7 +602,7 @@ int Cin_OGM_Init( const char *filename )
if ( status < 0 )
{
- Com_Printf( S_WARNING "Corrupt Ogg packet while loading Vorbis headers (%s)\n", filename );
+ Log::Warn( "Corrupt Ogg packet while loading Vorbis headers (%s)", filename );
return -8;
}
@@ -612,7 +612,7 @@ int Cin_OGM_Init( const char *filename )
if ( i == 0 && status < 0 )
{
- Com_Printf( S_WARNING "This Ogg bitstream does not contain Vorbis audio data (%s)\n", filename );
+ Log::Warn( "This Ogg bitstream does not contain Vorbis audio data (%s)", filename );
return -9;
}
@@ -622,7 +622,7 @@ int Cin_OGM_Init( const char *filename )
{
if ( loadBlockToSync() )
{
- Com_Printf( S_WARNING "Couldn't find all Vorbis headers before end of OGM file (%s)\n", filename );
+ Log::Warn( "Couldn't find all Vorbis headers before end of OGM file (%s)", filename );
return -10;
}
}
@@ -645,7 +645,7 @@ int Cin_OGM_Init( const char *filename )
if ( status < 0 )
{
- Com_Printf( S_WARNING "Corrupt Ogg packet while loading Theora headers (%s)\n", filename );
+ Log::Warn( "Corrupt Ogg packet while loading Theora headers (%s)", filename );
return -8;
}
@@ -655,7 +655,7 @@ int Cin_OGM_Init( const char *filename )
if ( i == 0 && status != 0 )
{
- Com_Printf( S_WARNING "This Ogg bitstream does not contain Theora data (%s)\n", filename );
+ Log::Warn( "This Ogg bitstream does not contain Theora data (%s)", filename );
return -9;
}
@@ -665,7 +665,7 @@ int Cin_OGM_Init( const char *filename )
{
if ( loadBlockToSync() )
{
- Com_Printf( S_WARNING "Couldn't find all Theora headers before end of OGM file (%s)\n", filename );
+ Log::Warn( "Couldn't find all Theora headers before end of OGM file (%s)", filename );
return -10;
}
}
@@ -675,13 +675,13 @@ int Cin_OGM_Init( const char *filename )
if ( !isPowerOf2( g_ogm.th_info.width ) )
{
- Com_Printf( S_WARNING "Video width of the OGM file isn't a power of 2 (%s)\n", filename );
+ Log::Warn( "Video width of the OGM file isn't a power of 2 (%s)", filename );
return -5;
}
if ( !isPowerOf2( g_ogm.th_info.height ) )
{
- Com_Printf( S_WARNING "Video height of the OGM file isn't a power of 2 (%s)\n", filename );
+ Log::Warn( "Video height of the OGM file isn't a power of 2 (%s)", filename );
return -6;
}
@@ -394,7 +394,7 @@ bool CL_OpenAVIForWriting( const char *fileName )
suggestRate--;
}
- Com_Printf( S_WARNING "cl_aviFrameRate is not a divisor of the audio rate, suggest %d\n", suggestRate );
+ Log::Warn( "cl_aviFrameRate is not a divisor of the audio rate, suggest %d", suggestRate );
}
if ( !Cvar_VariableIntegerValue( "s_initsound" ) )
@@ -415,7 +415,7 @@ bool CL_OpenAVIForWriting( const char *fileName )
else
{
afd.audio = false;
- Com_Printf( S_WARNING "Audio capture is not supported with OpenAL. Set s_useOpenAL to 0 for audio capture\n" );
+ Log::Warn( "Audio capture is not supported with OpenAL. Set s_useOpenAL to 0 for audio capture" );
}
// This doesn't write a real header, but allocates the
@@ -603,7 +603,7 @@ bool CL_CloseAVI()
Z_Free( afd.eBuffer );
FS_FCloseFile( afd.f );
- Com_Printf( "Wrote %d:%d frames to %s\n", afd.numVideoFrames, afd.numAudioFrames, afd.fileName );
+ Log::Notice( "Wrote %d:%d frames to %s\n", afd.numVideoFrames, afd.numAudioFrames, afd.fileName );
return true;
}
Oops, something went wrong.

0 comments on commit 2bf1076

Please sign in to comment.