Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
D
dynamic-graph
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
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
Stack Of Tasks
dynamic-graph
Commits
e4d3adf6
Commit
e4d3adf6
authored
Jan 31, 2020
by
Joseph Mirabel
Committed by
olivier stasse
Jan 31, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Provide backward compatibility + reorganize headers.
parent
f17106c5
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
23 additions
and
4 deletions
+23
-4
include/dynamic-graph/logger.h
include/dynamic-graph/logger.h
+16
-4
src/debug/logger.cpp
src/debug/logger.cpp
+7
-0
No files found.
include/dynamic-graph/logger.h
View file @
e4d3adf6
...
...
@@ -45,14 +45,18 @@ enum MsgType {
/* --- INCLUDE --------------------------------------------------------- */
/* --------------------------------------------------------------------- */
#include <map>
/// \todo These 3 headers should be removed.
#include <fstream>
#include <iomanip> // std::setprecision
#include <sstream>
#include <boost/assign.hpp>
#include <boost/preprocessor/stringize.hpp>
#include <dynamic-graph/deprecated.hh>
#include <dynamic-graph/linear-algebra.h>
#include <dynamic-graph/real-time-logger-def.h>
#include <fstream>
#include <iomanip> // std::setprecision
#include <map>
#include <sstream>
namespace
dynamicgraph
{
...
...
@@ -217,6 +221,14 @@ public:
*/
void
sendMsg
(
std
::
string
msg
,
MsgType
type
,
const
std
::
string
&
lineId
=
""
);
/** \deprecated instead, use
* \code
* stream(type, lineId) << msg << '\n';
* \endcode
*/
void
sendMsg
(
std
::
string
msg
,
MsgType
type
,
const
std
::
string
&
file
,
int
line
)
DYNAMIC_GRAPH_DEPRECATED
;
/** Set the sampling time at which the method countdown()
* is going to be called. */
bool
setTimeSample
(
double
t
);
...
...
src/debug/logger.cpp
View file @
e4d3adf6
...
...
@@ -43,6 +43,13 @@ void Logger::sendMsg(std::string msg, MsgType type, const std::string &lineId) {
stream
(
type
,
lineId
)
<<
msg
<<
'\n'
;
}
void
Logger
::
sendMsg
(
std
::
string
msg
,
MsgType
type
,
const
std
::
string
&
file
,
int
line
)
{
std
::
ostringstream
oss
;
oss
<<
file
<<
line
;
stream
(
type
,
oss
.
str
())
<<
msg
<<
'\n'
;
}
bool
Logger
::
setTimeSample
(
double
t
)
{
if
(
t
<=
0.0
)
return
false
;
...
...
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