Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
senf
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
wiback
senf
Commits
6e983829
Commit
6e983829
authored
17 years ago
by
g0dil
Browse files
Options
Downloads
Patches
Plain Diff
Utils/Logger: BUGFIX: add SENF_LOG_TPL variants which work with templatized log parameters
parent
1395af06
No related branches found
No related tags found
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
PPI/DebugModules.cti
+1
-1
1 addition, 1 deletion
PPI/DebugModules.cti
PPI/DebugModules.test.cc
+1
-1
1 addition, 1 deletion
PPI/DebugModules.test.cc
Utils/Logger/Log.hh
+8
-0
8 additions, 0 deletions
Utils/Logger/Log.hh
Utils/Logger/Parameters.ih
+5
-0
5 additions, 0 deletions
Utils/Logger/Parameters.ih
with
15 additions
and
2 deletions
PPI/DebugModules.cti
+
1
−
1
View file @
6e983829
...
...
@@ -48,7 +48,7 @@ template <class Stream, class Area, class Level>
prefix_ void senf::ppi::module::debug::LogSink<Stream,Area,Level>::request()
{
Packet packet (input());
SENF_LOG_BLOCK((Stream)(Area)(Level)({
SENF_LOG_BLOCK
_TPL
((Stream)(Area)(Level)({
packet.dump(log);
hexdump(packet.last().data().begin(), packet.last().data().end(),log);
}));
...
...
This diff is collapsed.
Click to expand it.
PPI/DebugModules.test.cc
+
1
−
1
View file @
6e983829
...
...
@@ -36,7 +36,7 @@ namespace {
std
::
stringstream
logstream
;
}
#define SENF_LOG_CONF ((senf
::
log
::
Debug)(_)
(
VERBOSE))
#define SENF_LOG_CONF ((
(
senf
)(
log
)(
Debug)
,
(_)
,
VERBOSE
))
#include
"../Packets/Packets.hh"
#include
"DebugModules.hh"
...
...
This diff is collapsed.
Click to expand it.
Utils/Logger/Log.hh
+
8
−
0
View file @
6e983829
...
...
@@ -51,6 +51,10 @@
SENF_LOG_BLOCK_( SENF_LOG_MERGE_PARAMETERS(BOOST_PP_SEQ_POP_BACK(args)), \
{ log << BOOST_PP_SEQ_ELEM(BOOST_PP_DEC(BOOST_PP_SEQ_SIZE(args)),args); })
#define SENF_LOG_TPL(args) \
SENF_LOG_BLOCK_( SENF_LOG_MERGE_PARAMETERS_TPL(BOOST_PP_SEQ_POP_BACK(args)), \
{ log << BOOST_PP_SEQ_ELEM(BOOST_PP_DEC(BOOST_PP_SEQ_SIZE(args)),args); })
/** \brief Enable block based on logging parameters
This macro is like SENF_LOG, however instead of writing a simple message, this macro allows
...
...
@@ -68,6 +72,10 @@
SENF_LOG_BLOCK_( SENF_LOG_MERGE_PARAMETERS(BOOST_PP_SEQ_POP_BACK(args)), \
BOOST_PP_SEQ_ELEM(BOOST_PP_DEC(BOOST_PP_SEQ_SIZE(args)),args))
#define SENF_LOG_BLOCK_TPL(args) \
SENF_LOG_BLOCK_( SENF_LOG_MERGE_PARAMETERS_TPL(BOOST_PP_SEQ_POP_BACK(args)), \
BOOST_PP_SEQ_ELEM(BOOST_PP_DEC(BOOST_PP_SEQ_SIZE(args)),args))
#define SENF_LOG_BLOCK_(parameters, block) \
do { \
if (parameters::compile_enabled && parameters::enabled()) { \
...
...
This diff is collapsed.
Click to expand it.
Utils/Logger/Parameters.ih
+
5
−
0
View file @
6e983829
...
...
@@ -126,6 +126,11 @@ namespace detail {
senf::log::detail::empty, \
(SENFLogDefaultStream)(SENFLogDefaultArea)(SENFLogDefaultLevel)args) >
#define SENF_LOG_MERGE_PARAMETERS_TPL(args) \
senf::log::detail::Parameters< typename SENF_LOG_MERGE_PARAMETERS_I( \
senf::log::detail::empty, \
(SENFLogDefaultStream)(SENFLogDefaultArea)(SENFLogDefaultLevel)args) >
///////////////////////////////ih.e////////////////////////////////////////
#endif
...
...
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