Daemon icon indicating copy to clipboard operation
Daemon copied to clipboard

Console spam protection suppresses command output.

Open mjstahlberg opened this issue 2 years ago • 4 comments

The suppression of duplicate messages affects also the output of user supplied commands, such as Unvanquished's entityList:

]/entityList  
  0:          PLAYER/player                   
 64:         GENERAL/pos_player_intermission  
 65:       BUILDABLE/team_human_spawn         
 66:       BUILDABLE/team_alien_overmind      
 67:       BUILDABLE/team_alien_spawn         
 68:       BUILDABLE/team_human_spawn         
 69:           MOVER/func_door                
 70:           MOVER/func_door                
 71:       BUILDABLE/team_human_mgturret      
 72:       BUILDABLE/team_human_mgturret      [further messages like this will be suppressed] 
A total of 46 entities are currently in use. 
]/entityList
A total of 46 entities are currently in use. 
]/logs.suppression.enabled 0
]/entityList                
  0:          PLAYER/player                   
 64:         GENERAL/pos_player_intermission  
 65:       BUILDABLE/team_human_spawn         
…
106:          BEACON/beacon                   
107:          BEACON/beacon                   
108:          BEACON/beacon                   
A total of 46 entities are currently in use. 

Ideally, suppression should not affect messages that the user has asked for.

mjstahlberg avatar Apr 02 '23 09:04 mjstahlberg

The new-style commands (Cmd::StaticCmd etc.) have a Print function which bypasses suppression, but old ones just use Log::Notice so there's no way to distinguish them from logging.

Log::CommandInteractionMessage() can be used to print a command output bypassing suppression.

slipher avatar Apr 02 '23 17:04 slipher

Good to know, so this issue should be transfered to Unvanquished?

mjstahlberg avatar Apr 02 '23 20:04 mjstahlberg

I'm not sure whether new-style commands have actually been implemented for the gamelogic. If not that's a job for the Daemon side...

slipher avatar Apr 02 '23 20:04 slipher

New-style commands do work in the gamelogic, albeit for only for the sort of command that is entered from a local console. However the other types of commands are sent over the network, so they necessarily have to use networked printing for their output and are not affected by this log suppression problem. So this issue is "merely" a matter of migrating all engine commands, all cgame commands, and all sgame console-only (sv_svcmds.cpp) commands.

slipher avatar Nov 17 '23 06:11 slipher