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
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
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 Archive
Alchemy Viewer
Commits
9260fbe0
Commit
9260fbe0
authored
8 years ago
by
Oz Linden
Browse files
Options
Downloads
Patches
Plain Diff
add location details to apr status logging
parent
d49786eb
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
indra/llcommon/llapr.cpp
+4
-21
4 additions, 21 deletions
indra/llcommon/llapr.cpp
indra/llcommon/llapr.h
+4
-5
4 additions, 5 deletions
indra/llcommon/llapr.h
with
8 additions
and
26 deletions
indra/llcommon/llapr.cpp
+
4
−
21
View file @
9260fbe0
...
...
@@ -291,35 +291,18 @@ void LLScopedLock::unlock()
//---------------------------------------------------------------------
bool
ll_apr_warn_status
(
apr_status_t
status
)
bool
_
ll_apr_warn_status
(
apr_status_t
status
,
const
char
*
file
,
int
line
)
{
if
(
APR_SUCCESS
==
status
)
return
false
;
char
buf
[
MAX_STRING
];
/* Flawfinder: ignore */
apr_strerror
(
status
,
buf
,
sizeof
(
buf
));
LL_WARNS
(
"APR"
)
<<
"APR: "
<<
buf
<<
LL_ENDL
;
LL_WARNS
(
"APR"
)
<<
"APR: "
<<
file
<<
":"
<<
line
<<
" "
<<
buf
<<
LL_ENDL
;
return
true
;
}
bool
ll_apr_
warn
_status
(
apr_status_t
status
,
apr_dso_handle_t
*
handl
e
)
void
_
ll_apr_
assert
_status
(
apr_status_t
status
,
const
char
*
file
,
int
lin
e
)
{
bool
result
=
ll_apr_warn_status
(
status
);
// Despite observed truncation of actual Mac dylib load errors, increasing
// this buffer to more than MAX_STRING doesn't help: it appears that APR
// stores the output in a fixed 255-character internal buffer. (*sigh*)
char
buf
[
MAX_STRING
];
/* Flawfinder: ignore */
apr_dso_error
(
handle
,
buf
,
sizeof
(
buf
));
LL_WARNS
(
"APR"
)
<<
"APR: "
<<
buf
<<
LL_ENDL
;
return
result
;
}
void
ll_apr_assert_status
(
apr_status_t
status
)
{
llassert
(
!
ll_apr_warn_status
(
status
));
}
void
ll_apr_assert_status
(
apr_status_t
status
,
apr_dso_handle_t
*
handle
)
{
llassert
(
!
ll_apr_warn_status
(
status
,
handle
));
llassert
(
!
_ll_apr_warn_status
(
status
,
file
,
line
));
}
//---------------------------------------------------------------------
...
...
This diff is collapsed.
Click to expand it.
indra/llcommon/llapr.h
+
4
−
5
View file @
9260fbe0
...
...
@@ -52,12 +52,11 @@ struct apr_dso_handle_t;
* APR_SUCCESS.
* @return Returns <code>true</code> if status is an error condition.
*/
bool
LL_COMMON_API
ll_apr_warn_status
(
apr_status_t
status
);
/// There's a whole other APR error-message function if you pass a DSO handle.
bool
LL_COMMON_API
ll_apr_warn_status
(
apr_status_t
status
,
apr_dso_handle_t
*
handle
);
#define ll_apr_warn_status(status) _ll_apr_warn_status(status, __FILE__, __LINE__)
bool
LL_COMMON_API
_ll_apr_warn_status
(
apr_status_t
status
,
const
char
*
file
,
int
line
);
void
LL_COMMON_API
ll_apr_assert_status
(
apr
_status
_t
status
)
;
void
LL_COMMON_API
ll_apr_assert_status
(
apr_status_t
status
,
apr_dso_handle_t
*
handl
e
);
#define
ll_apr_assert_status(
status) _ll_apr_assert
_status
(
status
, __FILE__, __LINE__
)
void
LL_COMMON_API
_
ll_apr_assert_status
(
apr_status_t
status
,
const
char
*
file
,
int
lin
e
);
extern
"C"
LL_COMMON_API
apr_pool_t
*
gAPRPoolp
;
// Global APR memory pool
...
...
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