The “DisableAllScreenMessags” console command is used to turn off those messages displayed via the BP “Print” node or the GEngine->AddOnScreenDebugMessage() method in C++. The “Lighting needs to be rebuilt” message you are referring to, however, is not affected by this AFAIK. In order to get rid of that message simply build the level lighting (via the BUILD button in the top button bar within the UE4 editor).