Skip to content
Snippets Groups Projects
Commit 1804da89 authored by Nat Goodspeed's avatar Nat Goodspeed
Browse files

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.
parent 1ed351e2
No related branches found
No related tags found
No related merge requests found
...@@ -20,6 +20,7 @@ ...@@ -20,6 +20,7 @@
#include <boost/exception/diagnostic_information.hpp> #include <boost/exception/diagnostic_information.hpp>
// other Linden headers // other Linden headers
#include "llerror.h" #include "llerror.h"
#include "llerrorcontrol.h"
namespace { namespace {
// used by crash_on_unhandled_exception_() and log_unhandled_exception_() // used by crash_on_unhandled_exception_() and log_unhandled_exception_()
...@@ -28,8 +29,8 @@ void log_unhandled_exception_(LLError::ELevel level, ...@@ -28,8 +29,8 @@ void log_unhandled_exception_(LLError::ELevel level,
const std::string& context) const std::string& context)
{ {
// log same message but allow caller-specified severity level // log same message but allow caller-specified severity level
LL_VLOGS(level, "LLException") LL_VLOGS(level, "LLException") << LLError::abbreviateFile(file)
<< file << "(" << line << "): Unhandled exception caught in " << pretty_function; << "(" << line << "): Unhandled exception caught in " << pretty_function;
if (! context.empty()) if (! context.empty())
{ {
LL_CONT << ": " << context; LL_CONT << ": " << context;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment