summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
Diffstat (limited to 'indra')
-rwxr-xr-xindra/llcommon/llerror.cpp12
-rwxr-xr-xindra/llcommon/llerror.h3
-rwxr-xr-xindra/llcommon/tests/llleap_test.cpp3
-rwxr-xr-xindra/llcommon/tests/llprocess_test.cpp3
-rwxr-xr-xindra/llcommon/tests/llsdserialize_test.cpp4
-rwxr-xr-xindra/test/manageapr.h46
6 files changed, 12 insertions, 59 deletions
diff --git a/indra/llcommon/llerror.cpp b/indra/llcommon/llerror.cpp
index 590e236090..5bb6f53828 100755
--- a/indra/llcommon/llerror.cpp
+++ b/indra/llcommon/llerror.cpp
@@ -926,9 +926,10 @@ namespace
std::ostringstream message_stream;
+ const_cast<LLError::CallSite&>(site).mTagString += " ";
if (show_location && (r->wantsLocation() || level == LLError::LEVEL_ERROR || s.mPrintLocation))
{
- message_stream << site.mLocationString;
+ //message_stream << site.mLocationString;
message_stream << " ";
}
@@ -949,12 +950,13 @@ namespace
if (show_function && r->wantsFunctionName())
{
- message_stream << site.mFunctionString << " ";
+ //message_stream << site.mFunctionString << " ";
}
message_stream << message;
- r->recordMessage(level, message_stream.str());
+ std::string final_message = message_stream.str();
+ r->recordMessage(level, final_message);
}
}
}
@@ -1158,6 +1160,10 @@ namespace LLError
Globals& g = Globals::get();
Settings& s = Settings::get();
+ //const_cast<CallSite&>(site).mTagString += " ";
+ std::string tag_string = site.mTagString;
+ tag_string += " ";
+
std::string message = out->str();
if (out == &g.messageStream)
{
diff --git a/indra/llcommon/llerror.h b/indra/llcommon/llerror.h
index 6eaab450ed..6cac952b7e 100755
--- a/indra/llcommon/llerror.h
+++ b/indra/llcommon/llerror.h
@@ -302,7 +302,8 @@ typedef LLError::NoClassInfo _LL_CLASS_TO_LOG;
// See top of file for common usage.
/////////////////////////////////
-// this macro uses a one-shot do statement to avoid parsing errors when writing:
+// this macro uses a one-shot do statement to avoid parsing errors when writing control flow statements
+// without braces:
// if (condition) LL_INFOS() << "True" << LLENDL; else LLINFOS() << "False" << LLENDL
#define lllog(level, once, ...) \
diff --git a/indra/llcommon/tests/llleap_test.cpp b/indra/llcommon/tests/llleap_test.cpp
index 29060d4ef5..9ea822cb8d 100755
--- a/indra/llcommon/tests/llleap_test.cpp
+++ b/indra/llcommon/tests/llleap_test.cpp
@@ -22,7 +22,6 @@
// other Linden headers
#include "../test/lltut.h"
#include "../test/namedtempfile.h"
-#include "../test/manageapr.h"
#include "../test/catch_and_store_what_in.h"
#include "wrapllerrs.h"
#include "llevents.h"
@@ -33,8 +32,6 @@
using boost::assign::list_of;
-static ManageAPR manager;
-
StringVec sv(const StringVec& listof) { return listof; }
#if defined(LL_WINDOWS)
diff --git a/indra/llcommon/tests/llprocess_test.cpp b/indra/llcommon/tests/llprocess_test.cpp
index f188865eb0..50b5c79e71 100755
--- a/indra/llcommon/tests/llprocess_test.cpp
+++ b/indra/llcommon/tests/llprocess_test.cpp
@@ -29,7 +29,6 @@
//#include <boost/lambda/bind.hpp>
// other Linden headers
#include "../test/lltut.h"
-#include "../test/manageapr.h"
#include "../test/namedtempfile.h"
#include "../test/catch_and_store_what_in.h"
#include "stringize.h"
@@ -47,8 +46,6 @@
//namespace lambda = boost::lambda;
-// static instance of this manages APR init/cleanup
-static ManageAPR manager;
/*****************************************************************************
* Helpers
diff --git a/indra/llcommon/tests/llsdserialize_test.cpp b/indra/llcommon/tests/llsdserialize_test.cpp
index 235008a5ae..b5893135ea 100755
--- a/indra/llcommon/tests/llsdserialize_test.cpp
+++ b/indra/llcommon/tests/llsdserialize_test.cpp
@@ -56,12 +56,9 @@ namespace lambda = boost::lambda;
#include "../llformat.h"
#include "../test/lltut.h"
-#include "../test/manageapr.h"
#include "../test/namedtempfile.h"
#include "stringize.h"
-static ManageAPR manager;
-
std::vector<U8> string_to_vector(const std::string& str)
{
return std::vector<U8>(str.begin(), str.end());
@@ -1723,5 +1720,6 @@ namespace tut
"This string\n"
"has several\n"
"lines.");
+
}
}
diff --git a/indra/test/manageapr.h b/indra/test/manageapr.h
deleted file mode 100755
index 2452fb6ae4..0000000000
--- a/indra/test/manageapr.h
+++ /dev/null
@@ -1,46 +0,0 @@
-/**
- * @file manageapr.h
- * @author Nat Goodspeed
- * @date 2012-01-13
- * @brief ManageAPR class for simple test programs
- *
- * $LicenseInfo:firstyear=2012&license=viewerlgpl$
- * Copyright (c) 2012, Linden Research, Inc.
- * $/LicenseInfo$
- */
-
-#if ! defined(LL_MANAGEAPR_H)
-#define LL_MANAGEAPR_H
-
-#include "llapr.h"
-#include <boost/noncopyable.hpp>
-
-/**
- * Declare a static instance of this class for dead-simple ll_init_apr() at
- * program startup, ll_cleanup_apr() at termination. This is recommended for
- * use only with simple test programs. Once you start introducing static
- * instances of other classes that depend on APR already being initialized,
- * the indeterminate static-constructor-order problem rears its ugly head.
- */
-class ManageAPR: public boost::noncopyable
-{
-public:
- ManageAPR()
- {
- ll_init_apr();
- }
-
- ~ManageAPR()
- {
- ll_cleanup_apr();
- }
-
- static std::string strerror(apr_status_t rv)
- {
- char errbuf[256];
- apr_strerror(rv, errbuf, sizeof(errbuf));
- return errbuf;
- }
-};
-
-#endif /* ! defined(LL_MANAGEAPR_H) */