Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
A
Actor Framework
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
cpp-libs
Actor Framework
Commits
50abe47a
Commit
50abe47a
authored
Mar 17, 2018
by
Dominik Charousset
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Reduce noise in CAF logs
parent
deeabd7e
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
3 deletions
+10
-3
libcaf_core/src/logger.cpp
libcaf_core/src/logger.cpp
+3
-0
libcaf_core/src/pretty_type_name.cpp
libcaf_core/src/pretty_type_name.cpp
+7
-3
No files found.
libcaf_core/src/logger.cpp
View file @
50abe47a
...
...
@@ -285,6 +285,9 @@ void logger::render_fun_prefix(std::ostream& out, const char* pretty_fun) {
// skip "virtual" prefix if present
if
(
strncmp
(
pretty_fun
,
"virtual "
,
std
::
min
<
size_t
>
(
strsize
,
8
))
==
0
)
jump_to_next_whitespace
();
// skip "static" prefix if present
if
(
strncmp
(
pretty_fun
,
"static "
,
std
::
min
<
size_t
>
(
strsize
,
7
))
==
0
)
jump_to_next_whitespace
();
// skip return type
jump_to_next_whitespace
();
if
(
first
==
last
)
...
...
libcaf_core/src/pretty_type_name.cpp
View file @
50abe47a
...
...
@@ -34,7 +34,7 @@ namespace detail {
void
prettify_type_name
(
std
::
string
&
class_name
)
{
//replace_all(class_name, " ", "");
replace_all
(
class_name
,
"::"
,
"."
);
replace_all
(
class_name
,
"(anonymousnamespace)"
,
"ANON"
);
replace_all
(
class_name
,
"(anonymous
namespace)"
,
"ANON"
);
replace_all
(
class_name
,
".__1."
,
"."
);
// gets rid of weird Clang-lib names
// hide CAF magic in logs
auto
strip_magic
=
[
&
](
const
char
*
prefix_begin
,
const
char
*
prefix_end
)
{
...
...
@@ -49,7 +49,11 @@ void prettify_type_name(std::string& class_name) {
};
char
prefix1
[]
=
"caf.detail.embedded<"
;
strip_magic
(
prefix1
,
prefix1
+
(
sizeof
(
prefix1
)
-
1
));
// finally, replace any whitespace with %20
// Drop template parameters, only leaving the template class name.
auto
i
=
std
::
find
(
class_name
.
begin
(),
class_name
.
end
(),
'<'
);
if
(
i
!=
class_name
.
end
())
class_name
.
erase
(
i
,
class_name
.
end
());
// Finally, replace any whitespace with %20 (should never happen).
replace_all
(
class_name
,
" "
,
"%20"
);
}
...
...
@@ -72,5 +76,5 @@ std::string pretty_type_name(const std::type_info& x) {
return
result
;
}
}
// namespace detail
}
// namespace detail
}
// namespace caf
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment