Skip to content

Commit

Permalink
Remove newlines in logs
Browse files Browse the repository at this point in the history
  • Loading branch information
DolceTriade committed Feb 16, 2016
1 parent f5a11b6 commit c51de70
Show file tree
Hide file tree
Showing 10 changed files with 415 additions and 414 deletions.
2 changes: 1 addition & 1 deletion daemon/src/engine/renderer/tr_mesh.cpp
Expand Up @@ -300,7 +300,7 @@ void R_AddMDVSurfaces( trRefEntity_t *ent )
if ( ( ent->e.frame >= tr.currentModel->mdv[ lod ]->numFrames ) if ( ( ent->e.frame >= tr.currentModel->mdv[ lod ]->numFrames )
|| ( ent->e.frame < 0 ) || ( ent->e.oldframe >= tr.currentModel->mdv[ lod ]->numFrames ) || ( ent->e.oldframe < 0 ) ) || ( ent->e.frame < 0 ) || ( ent->e.oldframe >= tr.currentModel->mdv[ lod ]->numFrames ) || ( ent->e.oldframe < 0 ) )
{ {
Log::Warn("R_AddMDVSurfaces: no such frame %d to %d for '%s' (%d)", Log::Debug("R_AddMDVSurfaces: no such frame %d to %d for '%s' (%d)",
ent->e.oldframe, ent->e.frame, tr.currentModel->name, tr.currentModel->mdv[ lod ]->numFrames ); ent->e.oldframe, ent->e.frame, tr.currentModel->name, tr.currentModel->mdv[ lod ]->numFrames );
ent->e.frame = 0; ent->e.frame = 0;
ent->e.oldframe = 0; ent->e.oldframe = 0;
Expand Down
25 changes: 12 additions & 13 deletions daemon/src/engine/server/sv_main.cpp
Expand Up @@ -367,7 +367,7 @@ void SV_MasterHeartbeat( const char *hbname )
continue; continue;
} }


Log::Notice( "Sending heartbeat to %s\n", sv_master[ i ]->string ); Log::Notice( "Sending heartbeat to %s", sv_master[ i ]->string );


// this command should be changed if the server info / status format // this command should be changed if the server info / status format
// ever incompatibly changes // ever incompatibly changes
Expand Down Expand Up @@ -419,12 +419,12 @@ void SV_MasterGameStat( const char *data )
return; // only dedicated servers send stats return; // only dedicated servers send stats
} }


Log::Notice( "Resolving %s\n", MASTER_SERVER_NAME ); Log::Notice( "Resolving %s", MASTER_SERVER_NAME );


switch ( NET_StringToAdr( MASTER_SERVER_NAME, &adr, netadrtype_t::NA_UNSPEC ) ) switch ( NET_StringToAdr( MASTER_SERVER_NAME, &adr, netadrtype_t::NA_UNSPEC ) )
{ {
case 0: case 0:
Log::Notice( "Couldn't resolve master address: %s\n", MASTER_SERVER_NAME ); Log::Warn( "Couldn't resolve master address: %s", MASTER_SERVER_NAME );
return; return;


case 2: case 2:
Expand All @@ -434,10 +434,10 @@ void SV_MasterGameStat( const char *data )
break; break;
} }


Log::Notice( "%s resolved to %s\n", MASTER_SERVER_NAME, Log::Notice( "%s resolved to %s", MASTER_SERVER_NAME,
NET_AdrToStringwPort( adr ) ); NET_AdrToStringwPort( adr ) );


Log::Notice( "Sending gamestat to %s\n", MASTER_SERVER_NAME ); Log::Notice( "Sending gamestat to %s", MASTER_SERVER_NAME );
NET_OutOfBandPrint( netsrc_t::NS_SERVER, adr, "gamestat %s", data ); NET_OutOfBandPrint( netsrc_t::NS_SERVER, adr, "gamestat %s", data );
} }


Expand Down Expand Up @@ -746,7 +746,7 @@ bool SV_CheckDRDoS( netadr_t from )
{ {
if ( lastGlobalLogTime + 1000 <= svs.time ) // Limit one log every second. if ( lastGlobalLogTime + 1000 <= svs.time ) // Limit one log every second.
{ {
Log::Notice( "Detected flood of getinfo/getstatus connectionless packets\n" ); Log::Notice( "Detected flood of getinfo/getstatus connectionless packets" );
lastGlobalLogTime = svs.time; lastGlobalLogTime = svs.time;
} }


Expand All @@ -757,7 +757,7 @@ bool SV_CheckDRDoS( netadr_t from )
{ {
if ( lastSpecificLogTime + 1000 <= svs.time ) // Limit one log every second. if ( lastSpecificLogTime + 1000 <= svs.time ) // Limit one log every second.
{ {
Log::Notice( "Possible DRDoS attack to address %i.%i.%i.%i, ignoring getinfo/getstatus connectionless packet\n", Log::Notice( "Possible DRDoS attack to address %i.%i.%i.%i, ignoring getinfo/getstatus connectionless packet",
exactFrom.ip[ 0 ], exactFrom.ip[ 1 ], exactFrom.ip[ 2 ], exactFrom.ip[ 3 ] ); exactFrom.ip[ 0 ], exactFrom.ip[ 1 ], exactFrom.ip[ 2 ], exactFrom.ip[ 3 ] );
lastSpecificLogTime = svs.time; lastSpecificLogTime = svs.time;
} }
Expand Down Expand Up @@ -791,7 +791,6 @@ class RconEnvironment: public Cmd::DefaultEnvironment {
} }


buffer += text; buffer += text;
buffer += '\n';
} }


void Flush() { void Flush() {
Expand Down Expand Up @@ -830,12 +829,12 @@ void SVC_RemoteCommand( netadr_t from, const Cmd::Args& args )
if ( !strlen( sv_rconPassword->string ) || args.Argv(1) != sv_rconPassword->string ) if ( !strlen( sv_rconPassword->string ) || args.Argv(1) != sv_rconPassword->string )
{ {
valid = false; valid = false;
Log::Notice( "Bad rcon from %s:\n%s\n", NET_AdrToString( from ), args.ConcatArgs(2).c_str() ); Log::Notice( "Bad rcon from %s:\n%s", NET_AdrToString( from ), args.ConcatArgs(2).c_str() );
} }
else else
{ {
valid = true; valid = true;
Log::Notice( "Rcon from %s:\n%s\n", NET_AdrToString( from ), args.ConcatArgs(2).c_str() ); Log::Notice( "Rcon from %s:\n%s", NET_AdrToString( from ), args.ConcatArgs(2).c_str() );
} }


// start redirecting all print outputs to the packet // start redirecting all print outputs to the packet
Expand Down Expand Up @@ -925,7 +924,7 @@ void SV_ConnectionlessPacket( netadr_t from, msg_t *msg )
} }
else else
{ {
Log::Debug( "bad connectionless packet from %s:\n%s", NET_AdrToString( from ), args.ConcatArgs(0).c_str() ); Log::Debug( "bad connectionless packet from %s: %s", NET_AdrToString( from ), args.ConcatArgs(0).c_str() );
} }
} }


Expand Down Expand Up @@ -980,7 +979,7 @@ void SV_PacketEvent( netadr_t from, msg_t *msg )
// port assignments // port assignments
if ( cl->netchan.remoteAddress.port != from.port ) if ( cl->netchan.remoteAddress.port != from.port )
{ {
Log::Notice( "SV_PacketEvent: fixing up a translated port\n" ); Log::Notice( "SV_PacketEvent: fixing up a translated port" );
cl->netchan.remoteAddress.port = from.port; cl->netchan.remoteAddress.port = from.port;
} }


Expand Down Expand Up @@ -1232,7 +1231,7 @@ void SV_Frame( int msec )
// the menu kills the server with this cvar // the menu kills the server with this cvar
if ( sv_killserver->integer ) if ( sv_killserver->integer )
{ {
SV_Shutdown( "Server was killed.\n" ); SV_Shutdown( "Server was killed." );
Cvar_Set( "sv_killserver", "0" ); Cvar_Set( "sv_killserver", "0" );
return; return;
} }
Expand Down
4 changes: 2 additions & 2 deletions src/cgame/cg_event.cpp
Expand Up @@ -1242,11 +1242,11 @@ void CG_EntityEvent( centity_t *cent, vec3_t position )


if ( location && *location ) if ( location && *location )
{ {
Log::Notice( _( "%s Under attack – %s\n" ), base ? "[reactor]" : "[repeater]", location ); Log::Notice( _( "%s Under attack – %s" ), base ? "[reactor]" : "[repeater]", location );
} }
else else
{ {
Log::Notice( _( "%s Under attack\n" ), base ? "[reactor]" : "[repeater]" ); Log::Notice( _( "%s Under attack" ), base ? "[reactor]" : "[repeater]" );
} }
} }
else // this is for aliens, and the overmind is in range else // this is for aliens, and the overmind is in range
Expand Down
2 changes: 1 addition & 1 deletion src/cgame/cg_servercmds.cpp
Expand Up @@ -733,7 +733,7 @@ void CG_Menu( int menuType, int arg )
break; break;


default: default:
Log::Notice(_( "cgame: debug: no such menu %d\n"), menu ); Log::Notice(_( "cgame: debug: no such menu %d"), menu );
} }


if ( menu > 0 ) if ( menu > 0 )
Expand Down

0 comments on commit c51de70

Please sign in to comment.