phoenix-firestorm/indra/llcommon
Nat Goodspeed 962ccb4f01 DRTVWR-476: Facilitate debugging test programs with logging.
On Mac, even if you run a test program with --debug or set LOGTEST=DEBUG, it
won't log to stderr if you're filtering build output or running the build in
an emacs compile buffer. This is because, on Mac, a viewer launched by mouse
rather than from the command line is passed a stderr stream that ultimately
gets logged to the system Console. The shouldLogToStderr() function is
intended to avoid spamming the Console with the (voluminous) viewer log
output. It tests whether stderr isatty() and, if not, suppresses calling
LLError::logToStderr().

This makes debugging test programs using log output trickier than necessary.
Change shouldLogToStderr() to permit logging when either stderr isatty() or is
a pipe. The original intention is preserved in that empirically, a viewer
launched by mouse is passed a stderr stream identified as a character device
rather than as a pipe.

Also introduce SetEnv, a class that facilitates setting (e.g.) LOGTEST=DEBUG
for specific test programs without setting it for all test programs in the
build. Using the constructor for a static object means you can set environment
variables before main() is entered, which is important because it's the main()
function in test.cpp that acts on the LOGTEST and LOGFAIL environment
variables.

These changes make it unnecessary to retain the temporary change in test.cpp
to force LOGTEST to DEBUG.
2020-04-03 10:46:17 -04:00
..
tests DRTVWR-476: Cherry-pick debug aids from commit 77b0c53 (fiber-mutex) 2020-04-03 10:38:53 -04:00
CMakeLists.txt DRTVWR-476: Add unit tests for LLMainThreadTask. 2020-03-25 19:24:25 -04:00
StackWalker.cpp DRTVWR-476: Fix Windows line endings 2020-03-25 18:47:13 -04:00
StackWalker.h DRTVWR-476: Eliminate unnecessary typedefs from struct, enum decls. 2020-03-25 16:12:46 -04:00
ctype_workaround.h
fix_macros.h
indra_constants.cpp [SL-1360] - fix no alpha on default bake textures. uploaded new pngs 2019-02-20 03:16:05 +05:30
indra_constants.h Merge 2019-05-10 12:22:29 -06:00
is_approx_equal_fraction.h
linden_common.h
llalignedarray.h
llallocator.cpp Automated merge with tip of viewer-release to pick up 4.0.5 2016-05-19 11:00:03 -07:00
llallocator.h
llallocator_heap_profile.cpp
llallocator_heap_profile.h
llapp.cpp DRTVWR-476: Terminate long-lived coroutines to avoid shutdown crash. 2020-03-25 19:02:24 -04:00
llapp.h SL-10291 Replace apr_atomic with standard C++11 functionality 2019-01-15 18:31:17 +02:00
llapr.cpp SL-10291 Replace apr_mutex with standard C++11 functionality 2019-01-14 22:04:44 +02:00
llapr.h DRTVWR-494: Encapsulate redundant VS boilerplate around <mutex>. 2020-03-25 15:28:17 -04:00
llassettype.cpp MAINT-8803 Better UI handling of unrecognized inventory items 2018-08-01 17:41:34 +03:00
llassettype.h MAINT-8803 Better UI handling of unrecognized inventory items 2018-08-01 17:41:34 +03:00
llatomic.cpp SL-10291 Replace apr_atomic with standard C++11 functionality 2019-01-15 18:31:17 +02:00
llatomic.h SL-10291 Replace apr_atomic with standard C++11 functionality 2019-01-15 18:31:17 +02:00
llbase32.cpp
llbase32.h
llbase64.cpp
llbase64.h
llbitpack.cpp
llbitpack.h
llboost.h
llcallbacklist.cpp
llcallbacklist.h
llcallstack.cpp
llcallstack.h SL-859 - exceptionally verbose logging of object state updates, likely temporary 2018-01-29 16:35:56 +00:00
llcleanup.cpp MAINT-5232: Abbreviate __FILE__ path in log_subsystem_cleanup(). 2016-09-02 14:03:28 -04:00
llcleanup.h MAINT-5232: Move "llerror.h" out of llcleanup.h, llinitdestroyclass.h 2016-08-30 16:28:21 -04:00
llclickaction.h
llcommon.cpp DRTVWR-418, MAINT-6996: Rationalize LLMemory wrt 64-bit support. 2017-05-02 10:51:18 -04:00
llcommon.h
llcommonutils.cpp
llcommonutils.h
llcond.h DRTVWR-476: Fix first round of compile errors. 2020-03-25 18:44:04 -04:00
llcoros.cpp DRTVWR-476: make printActiveCoroutines() output slightly clearer. 2020-03-25 19:25:42 -04:00
llcoros.h DRTVWR-476: Make llcoro::logname() distinguish different threads. 2020-03-25 19:24:25 -04:00
llcrc.cpp
llcrc.h
llcriticaldamp.cpp
llcriticaldamp.h
lldate.cpp
lldate.h
lldeadmantimer.cpp
lldeadmantimer.h
lldefs.h
lldependencies.cpp MAINT-5011: Use LLTHROW() instead of plain BOOST_THROW_EXCEPTION(). 2016-08-17 11:36:24 -04:00
lldependencies.h DRTVWR-418: In 64 bits, storing size_t in an int is a no-no. 2016-12-01 08:44:52 -05:00
lldepthstack.h
lldictionary.cpp
lldictionary.h
lldoubledispatch.h
llendianswizzle.h
llerror.cpp DRTVWR-476: Facilitate debugging test programs with logging. 2020-04-03 10:46:17 -04:00
llerror.h DRTVWR-476: Cherry-pick debug aids from commit 77b0c53 (fiber-mutex) 2020-04-03 10:38:53 -04:00
llerrorcontrol.h DRTVWR-476: Make test program --debug switch work like LOGTEST=DEBUG. 2020-03-25 18:47:13 -04:00
llerrorlegacy.h
llerrorthread.cpp
llerrorthread.h
llevent.cpp
llevent.h
lleventapi.cpp
lleventapi.h
lleventcoro.cpp DRTVWR-476, SL-12197: Don't throw Stopping from main coroutine. 2020-03-25 19:24:25 -04:00
lleventcoro.h SL-793: Use Boost.Fiber instead of the "dcoroutine" library. 2020-03-25 17:32:45 -04:00
lleventdispatcher.cpp
lleventdispatcher.h DRTVWR-418: Fix a round of compile errors surfaced by -std=c++11. 2017-02-23 16:49:49 -05:00
lleventemitter.h
lleventfilter.cpp DRTVWR-476: Defer #include "lleventtimer.h" until lleventfilter.cpp. 2020-03-25 19:00:10 -04:00
lleventfilter.h DRTVWR-476: Defer #include "lleventtimer.h" until lleventfilter.cpp. 2020-03-25 19:00:10 -04:00
llevents.cpp DRTVWR-476: Make ~LLEventPumps() call reset() on its way out. 2020-03-25 19:00:10 -04:00
llevents.h DRTVWR-476: Eliminate static LLEventPump factory maps. 2020-03-25 18:58:16 -04:00
lleventtimer.cpp DRTVWR-494: Streamline LLEventTimer::updateClass(). 2020-03-25 15:28:17 -04:00
lleventtimer.h DRTVWR-476: Add LLEventTimer::run_every(), run_at(), run_after(). 2020-03-25 18:59:10 -04:00
llexception.cpp DRTVWR-476: On Windows, use prebuilt Boost.Stacktrace. 2020-03-25 19:24:25 -04:00
llexception.h DRTVWR-476: Enrich LLExceptions thrown by LLTHROW() with stack trace. 2020-03-25 19:21:16 -04:00
llfasttimer.cpp DRTVWR-494: Defend LLInstanceTracker against multi-thread usage. 2020-03-25 15:28:17 -04:00
llfasttimer.h [DRTVWR-476] - update cef, fix merge 2020-03-25 18:40:45 -04:00
llfile.cpp SL-10153: Review and rationalize fetching paths from environment. 2018-12-14 15:38:13 -05:00
llfile.h DRTVWR-476: Add LLUniqueFile, adding RAII semantics to LLFILE*. 2020-03-25 19:05:17 -04:00
llfindlocale.cpp
llfindlocale.h
llfixedbuffer.cpp SL-10291 Replace apr_mutex with standard C++11 functionality 2019-01-14 22:04:44 +02:00
llfixedbuffer.h
llformat.cpp
llformat.h
llframetimer.cpp
llframetimer.h
llhandle.h DRTVWR-418: #include "llrefcount.h" : LLTombStone uses LLRefCount. 2017-03-13 14:22:19 -04:00
llhash.h
llheartbeat.cpp
llheartbeat.h
llheteromap.cpp MAINT-5232: Add LLHeteroMap to contain objects of unrelated classes. 2016-10-12 23:01:48 -04:00
llheteromap.h DRTVWR-418: Make operator()() method for comparator functor const. 2017-02-03 10:34:01 -05:00
llindexedvector.h
llinitdestroyclass.cpp MAINT-5232: Move "llerror.h" out of llcleanup.h, llinitdestroyclass.h 2016-08-30 16:28:21 -04:00
llinitdestroyclass.h MAINT-5232: Normalize LLSingleton subclasses. 2016-09-15 20:18:12 -04:00
llinitparam.cpp MAINT-7593 FIXED "Failed to parse parameter" spam 2017-07-13 11:01:20 +03:00
llinitparam.h DRTVWR-474: Do NOT autokill updater process on viewer termination. 2018-10-03 14:00:05 -04:00
llinstancetracker.cpp DRTVWR-494: Move LL_ERRS out of llinstancetracker.h header file. 2020-03-25 15:28:17 -04:00
llinstancetracker.h DRTVWR-476: Adapt LLInstanceTracker::snapshot for VS limitations. 2020-03-25 19:24:25 -04:00
llkeythrottle.h
llkeyusetracker.h
llleap.cpp DRTVWR-474: Do NOT autokill updater process on viewer termination. 2018-10-03 14:00:05 -04:00
llleap.h DRTVWR-474: Do NOT autokill updater process on viewer termination. 2018-10-03 14:00:05 -04:00
llleaplistener.cpp DRTVWR-476: Eliminate static LLEventPump factory maps. 2020-03-25 18:58:16 -04:00
llleaplistener.h DRTVWR-476: Eliminate static LLEventPump factory maps. 2020-03-25 18:58:16 -04:00
llliveappconfig.cpp
llliveappconfig.h
lllivefile.cpp
lllivefile.h
llmainthreadtask.cpp DRTVWR-494: Add LLMainThreadTask to perform work on the main thread. 2020-03-25 15:28:17 -04:00
llmainthreadtask.h DRTVWR-494: Remove LLMainThreadTask::dispatch(LockStatic&, ...) 2020-03-25 15:28:17 -04:00
llmake.h DRTVWR-476: Engage variadic llmake() implementation. 2020-03-25 18:52:10 -04:00
llmd5.cpp
llmd5.h
llmemory.cpp MAINT-8091 Removed deprecated and unused private memory pooling 2018-01-30 14:03:26 +00:00
llmemory.h SL-944 - disabled a not-very-useful assert that greatly slows the RWD build 2018-07-31 14:02:42 +01:00
llmemorystream.cpp
llmemorystream.h
llmetricperformancetester.cpp MAINT-7758 Fixed freeze on loading lsl scripts from unicode named windows folder. 2017-08-30 19:57:02 +03:00
llmetricperformancetester.h MAINT-7758 Fixed freeze on loading lsl scripts from unicode named windows folder. 2017-08-30 19:57:02 +03:00
llmetrics.cpp
llmetrics.h
llmortician.cpp SL-10908 Output class names we are clearing on startup 2019-05-27 17:32:53 +03:00
llmortician.h SL-10908 Output class names we are clearing on startup 2019-05-27 17:32:53 +03:00
llmutex.cpp DRTVWR-494: Use std:🧵:id for LLThread::currentID(). 2020-03-25 15:28:17 -04:00
llmutex.h DRTVWR-494: Use std:🧵:id for LLThread::currentID(). 2020-03-25 15:28:17 -04:00
llnametable.h
llpointer.h
llpounceable.h MAINT-5232: Normalize LLSingleton subclasses. 2016-09-15 20:18:12 -04:00
llpredicate.cpp
llpredicate.h
llpreprocessor.h SL-793: Add LL_PRETTY_FUNCTION macro wrapping __PRETTY_FUNCTION__ 2020-03-25 18:39:20 -04:00
llpriqueuemap.h
llprocess.cpp DRTVWR-476: Fix confusing comment in LLProcess::handle_status(). 2020-03-25 18:44:04 -04:00
llprocess.h Pull in improvements to LLProcess termination via a commit from Nat Linden here: 4f39500cb4?at=default 2017-04-19 16:50:56 -07:00
llprocessor.cpp SL-967 simplify viewer log file field syntax 2018-08-29 16:43:45 -04:00
llprocessor.h
llprocinfo.cpp
llprocinfo.h
llptrto.cpp
llptrto.h
llqueuedthread.cpp
llqueuedthread.h SL-10291 Replace apr_atomic with standard C++11 functionality 2019-01-15 18:31:17 +02:00
llrand.cpp
llrand.h
llrefcount.cpp SL-10291 cleanup-mutex 2019-01-17 01:53:27 +02:00
llrefcount.h DRTVWR-494: Use std:🧵:id for LLThread::currentID(). 2020-03-25 15:28:17 -04:00
llregistry.h MAINT-5232: Normalize LLSingleton subclasses. 2016-09-15 20:18:12 -04:00
llrun.cpp
llrun.h
llsafehandle.h DRTVWR-418: Add dtor to LLSafeHandle<T>::NullInstanceHolder 2017-05-03 22:53:34 -04:00
llsd.cpp
llsd.h
llsdjson.cpp
llsdjson.h
llsdparam.cpp
llsdparam.h MAINT-6783 Xml parser warnings should show the file name 2016-09-30 11:21:22 +03:00
llsdserialize.cpp MAINT-8022 Handling memory errors in unzip_llsdNavMesh 2018-02-19 21:30:48 +02:00
llsdserialize.h MAINT-2338 Implemented binary parser depth control 2018-02-01 16:35:02 +02:00
llsdserialize_xml.cpp MAINT-2338 Implemented binary parser depth control 2018-02-01 16:35:02 +02:00
llsdserialize_xml.h
llsdutil.cpp SL-11216: Allow llsd::drill() to accept LLSD() as (empty) path. 2020-03-25 16:05:09 -04:00
llsdutil.h DRTVWR-476: Add llsd::array() and llsd::map() variadic functions. 2020-03-25 18:52:10 -04:00
llsimplehash.h
llsingleton.cpp DRTVWR-476: Log calls to LLParamSingleton::initParamSingleton(). 2020-03-25 19:25:42 -04:00
llsingleton.h DRTVWR-476: Cherry-pick debug aids from commit 77b0c53 (fiber-mutex) 2020-04-03 10:38:53 -04:00
llsmoothstep.h
llstacktrace.cpp DRTVWR-476: Fix Windows line endings 2020-03-25 18:47:13 -04:00
llstacktrace.h
llstatenums.h
llstaticstringtable.h
llstatsaccumulator.h MAINT-7634: Move StatsAccumulator into llcommon, collect data sent and error codes from core. 2017-07-28 14:07:25 -07:00
llstl.h merged jelly-doll viewer-release into bento 2016-05-21 08:15:28 -04:00
llstreamqueue.cpp
llstreamqueue.h
llstreamtools.cpp
llstreamtools.h
llstrider.h
llstring.cpp DRTVWR-476: Eliminate snprintf_hack::snprintf(). Use MS snprintf(). 2020-03-25 16:12:45 -04:00
llstring.h DRTVWR-476: Eliminate snprintf_hack::snprintf(). Use MS snprintf(). 2020-03-25 16:12:45 -04:00
llstringtable.cpp
llstringtable.h
llsys.cpp SL-9935 Include full win10 build number in Help > About Second Life and logs 2018-11-12 15:31:19 +02:00
llsys.h Automated merge with ssh://bitbucket.org/lindenlab/viewer-release 2017-10-11 14:35:49 -04:00
lltempredirect.cpp DRTVWR-476: Always clear both fields even if mOrigTarget invalid. 2020-03-25 19:06:13 -04:00
lltempredirect.h DRTVWR-476: Encapsulate dup()/dup2() fd saving as LLTempRedirect. 2020-03-25 19:06:12 -04:00
llthread.cpp DRTVWR-494: Use std:🧵:id for LLThread::currentID(). 2020-03-25 15:28:17 -04:00
llthread.h DRTVWR-494: Use std:🧵:id for LLThread::currentID(). 2020-03-25 15:28:17 -04:00
llthreadlocalstorage.cpp DRTVWR-494: Defend LLInstanceTracker against multi-thread usage. 2020-03-25 15:28:17 -04:00
llthreadlocalstorage.h
llthreadsafequeue.cpp SL-10291 Replace apr thread with standard C++11 functionality 2019-01-15 22:27:28 +02:00
llthreadsafequeue.h DRTVWR-476: Introduce LLThreadSafeQueue::close(). 2020-03-25 19:25:42 -04:00
lltimer.cpp
lltimer.h
lltrace.cpp
lltrace.h DRTVWR-494: Defend LLInstanceTracker against multi-thread usage. 2020-03-25 15:28:17 -04:00
lltraceaccumulators.cpp DRTVWR-476: Explicitly cast 64-bit NaN constant to F32 as needed. 2020-03-25 16:12:46 -04:00
lltraceaccumulators.h DRTVWR-476: Explicitly cast 64-bit NaN constant to F32 as needed. 2020-03-25 16:12:46 -04:00
lltracerecording.cpp MAINT-6366 - diagnostics related to animation asset downloads 2016-06-13 09:15:42 -04:00
lltracerecording.h
lltracethreadrecorder.cpp DRTVWR-494: Defend LLInstanceTracker against multi-thread usage. 2020-03-25 15:28:17 -04:00
lltracethreadrecorder.h
lltreeiterators.h
llunits.h
llunittype.h
lluri.cpp SL-10924 Missed symbol 2019-04-13 14:42:38 +03:00
lluri.h SL-10924 Fix data escaping to accomodate CEF update 2019-04-11 20:29:50 +03:00
lluriparser.cpp MAINT-6608 FIXED URI parser problem with links with username, password 2016-08-10 13:31:25 +03:00
lluriparser.h MAINT-6608 FIXED URI parser problem with links with username, password 2016-08-10 13:31:25 +03:00
lluuid.cpp DRTVWR-494: Use std:🧵:id for LLThread::currentID(). 2020-03-25 15:28:17 -04:00
lluuid.h
llwin32headers.h
llwin32headerslean.h
llworkerthread.cpp SL-10291 Replace apr_mutex with standard C++11 functionality 2019-01-14 22:04:44 +02:00
llworkerthread.h DRTVWR-494: Use std:🧵:id for LLThread::currentID(). 2020-03-25 15:28:17 -04:00
lockstatic.h DRTVWR-494: Move explanatory comments from LLSingleton to LockStatic. 2020-03-25 15:28:17 -04:00
mutex.h DRTVWR-494: Encapsulate redundant VS boilerplate around <mutex>. 2020-03-25 15:28:17 -04:00
stdtypes.h SL-10153: Introduce ll_convert, windows_message() templates. 2018-12-14 10:48:43 -05:00
string_table.h
stringize.h SL-821: Add WSTRINGIZE() and DEWSTRINGIZE() macros for wide strings. 2018-05-17 05:45:36 -04:00
timer.h
timing.cpp
u64.cpp
u64.h