MAINT-5011: Abbreviate __FILE__ path in log_unhandled_exception_().

LLError::abbreviateFile() is specifically to avoid cluttering log output with
the prefix of an absolute file path on the original build system, pointless
for anyone trying to read the log.
master
Nat Goodspeed 2016-09-02 14:00:18 -04:00
parent 1ed351e28f
commit 1804da89ee
1 changed files with 3 additions and 2 deletions

View File

@ -20,6 +20,7 @@
#include <boost/exception/diagnostic_information.hpp>
// other Linden headers
#include "llerror.h"
#include "llerrorcontrol.h"
namespace {
// used by crash_on_unhandled_exception_() and log_unhandled_exception_()
@ -28,8 +29,8 @@ void log_unhandled_exception_(LLError::ELevel level,
const std::string& context)
{
// log same message but allow caller-specified severity level
LL_VLOGS(level, "LLException")
<< file << "(" << line << "): Unhandled exception caught in " << pretty_function;
LL_VLOGS(level, "LLException") << LLError::abbreviateFile(file)
<< "(" << line << "): Unhandled exception caught in " << pretty_function;
if (! context.empty())
{
LL_CONT << ": " << context;