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
Original file line number Diff line number Diff line change
Expand Up @@ -300,7 +300,7 @@ void R_AddMDVSurfaces( trRefEntity_t *ent )
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 ) )
{
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.frame = 0;
ent->e.oldframe = 0;
Expand Down
25 changes: 12 additions & 13 deletions daemon/src/engine/server/sv_main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -367,7 +367,7 @@ void SV_MasterHeartbeat( const char *hbname )
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
// ever incompatibly changes
Expand Down Expand Up @@ -419,12 +419,12 @@ void SV_MasterGameStat( const char *data )
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 ) )
{
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;

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

Log::Notice( "%s resolved to %s\n", MASTER_SERVER_NAME,
Log::Notice( "%s resolved to %s", MASTER_SERVER_NAME,
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 );
}

Expand Down Expand Up @@ -746,7 +746,7 @@ bool SV_CheckDRDoS( netadr_t from )
{
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;
}

Expand All @@ -757,7 +757,7 @@ bool SV_CheckDRDoS( netadr_t from )
{
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 ] );
lastSpecificLogTime = svs.time;
}
Expand Down Expand Up @@ -791,7 +791,6 @@ class RconEnvironment: public Cmd::DefaultEnvironment {
}

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

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 )
{
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
{
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
Expand Down Expand Up @@ -925,7 +924,7 @@ void SV_ConnectionlessPacket( netadr_t from, msg_t *msg )
}
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
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;
}

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

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
{
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
Expand Down
2 changes: 1 addition & 1 deletion src/cgame/cg_servercmds.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -733,7 +733,7 @@ void CG_Menu( int menuType, int arg )
break;

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

if ( menu > 0 )
Expand Down
Loading

0 comments on commit c51de70

Please sign in to comment.