DRTVWR-476: Conflate LOGFAIL env var empty with completely unset.

Sometimes it's useful to be able to temporarily override an existing LOGFAIL
setting in the current environment. It's far more convenient to prepend
LOGFAIL='' to a command than to 'unset LOGFAIL' as a whole separate command --
and then remember to restore its previous value.
meow-7.2.2
Nat Goodspeed 2019-11-15 08:11:32 -05:00
parent bf8aea5059
commit 39f4acd921
1 changed files with 3 additions and 2 deletions

View File

@ -631,8 +631,9 @@ int main(int argc, char **argv)
const char* LOGFAIL = getenv("LOGFAIL");
boost::shared_ptr<LLReplayLog> replayer;
// As described in stream_usage(), LOGFAIL overrides both --debug and
// LOGTEST.
if (LOGFAIL)
// LOGTEST. But allow user to set LOGFAIL empty to revert to LOGTEST
// and/or --debug.
if (LOGFAIL && *LOGFAIL)
{
LLError::ELevel level = LLError::decodeLevel(LOGFAIL);
replayer.reset(new LLReplayLogReal(level, gAPRPoolp));