Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
Alchemy Viewer
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Releases
Package Registry
Operate
Terraform modules
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Silent mode is enabled
All outbound communications are blocked.
Learn more
.
Show more breadcrumbs
Alchemy Viewer
Alchemy Viewer
Commits
37d3993a
Commit
37d3993a
authored
8 years ago
by
Nat Goodspeed
Browse files
Options
Downloads
Patches
Plain Diff
MAINT-5232: Consolidate special LLSingletonBase logging logic.
parent
dcdccb3e
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
indra/llcommon/llsingleton.cpp
+15
-15
15 additions, 15 deletions
indra/llcommon/llsingleton.cpp
with
15 additions
and
15 deletions
indra/llcommon/llsingleton.cpp
+
15
−
15
View file @
37d3993a
...
@@ -316,8 +316,9 @@ void intrusive_ptr_release(LLSingletonBase::MasterRefcount* mrc)
...
@@ -316,8 +316,9 @@ void intrusive_ptr_release(LLSingletonBase::MasterRefcount* mrc)
}
}
/*---------------------------- Logging helpers -----------------------------*/
/*---------------------------- Logging helpers -----------------------------*/
//static
namespace
{
void
LLSingletonBase
::
logerrs
(
const
char
*
p1
,
const
char
*
p2
,
const
char
*
p3
,
const
char
*
p4
)
void
log
(
LLError
::
ELevel
level
,
const
char
*
p1
,
const
char
*
p2
,
const
char
*
p3
,
const
char
*
p4
)
{
{
// Check LLError::is_available() because some of LLError's infrastructure
// Check LLError::is_available() because some of LLError's infrastructure
// is itself an LLSingleton. If that LLSingleton has not yet been
// is itself an LLSingleton. If that LLSingleton has not yet been
...
@@ -325,31 +326,30 @@ void LLSingletonBase::logerrs(const char* p1, const char* p2, const char* p3, co
...
@@ -325,31 +326,30 @@ void LLSingletonBase::logerrs(const char* p1, const char* p2, const char* p3, co
// around and around we go.
// around and around we go.
if
(
LLError
::
is_available
())
if
(
LLError
::
is_available
())
{
{
LL_ERRS
(
)
<<
p1
<<
p2
<<
p3
<<
p4
<<
LL_ENDL
;
lllog
(
level
,
false
)
<<
p1
<<
p2
<<
p3
<<
p4
<<
LL_ENDL
;
}
}
else
else
{
{
// Caller may be a test program, or something else whose stderr is
// Caller may be a test program, or something else whose stderr is
// visible to the user.
// visible to the user.
std
::
cerr
<<
p1
<<
p2
<<
p3
<<
p4
<<
std
::
endl
;
std
::
cerr
<<
p1
<<
p2
<<
p3
<<
p4
<<
std
::
endl
;
// The other important side effect of LL_ERRS() is
// https://www.youtube.com/watch?v=OMG7paGJqhQ (emphasis on OMG)
LLError
::
crashAndLoop
(
std
::
string
());
}
}
}
}
}
// anonymous namespace
//static
//static
void
LLSingletonBase
::
logwarns
(
const
char
*
p1
,
const
char
*
p2
,
const
char
*
p3
,
const
char
*
p4
)
void
LLSingletonBase
::
logwarns
(
const
char
*
p1
,
const
char
*
p2
,
const
char
*
p3
,
const
char
*
p4
)
{
{
// See logerrs() remarks about is_available().
log
(
LLError
::
LEVEL_WARN
,
p1
,
p2
,
p3
,
p4
);
if
(
LLError
::
is_available
())
}
{
LL_WARNS
()
<<
p1
<<
p2
<<
p3
<<
p4
<<
LL_ENDL
;
//static
}
void
LLSingletonBase
::
logerrs
(
const
char
*
p1
,
const
char
*
p2
,
const
char
*
p3
,
const
char
*
p4
)
else
{
{
log
(
LLError
::
LEVEL_ERROR
,
p1
,
p2
,
p3
,
p4
);
std
::
cerr
<<
p1
<<
p2
<<
p3
<<
p4
<<
std
::
endl
;
// The other important side effect of LL_ERRS() is
}
// https://www.youtube.com/watch?v=OMG7paGJqhQ (emphasis on OMG)
LLError
::
crashAndLoop
(
std
::
string
());
}
}
std
::
string
LLSingletonBase
::
demangle
(
const
char
*
mangled
)
std
::
string
LLSingletonBase
::
demangle
(
const
char
*
mangled
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment