Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Guilhem Saurel
hpp-util
Commits
ff6e74ba
Commit
ff6e74ba
authored
Mar 09, 2016
by
Joseph Mirabel
Committed by
Joseph Mirabel
Mar 09, 2016
Browse files
Create log file before the first write and not only with HPP_DEBUG
parent
1c7fbb38
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/debug.cc
View file @
ff6e74ba
...
...
@@ -204,11 +204,7 @@ namespace hpp
JournalOutput
::
JournalOutput
(
std
::
string
filename
)
:
filename
(
filename
),
lastFunction
(),
#ifdef HPP_DEBUG
stream
(
makeLogFile
(
*
this
).
c_str
())
#else
stream
()
#endif
{}
JournalOutput
::~
JournalOutput
()
...
...
@@ -235,6 +231,8 @@ namespace hpp
char
const
*
function
,
const
std
::
string
&
data
)
{
if
(
!
stream
.
is_open
())
stream
.
open
(
makeLogFile
(
*
this
).
c_str
());
if
(
lastFunction
!=
function
)
{
if
(
!
lastFunction
.
empty
())
...
...
@@ -259,6 +257,7 @@ namespace hpp
char
const
*
function
,
const
std
::
stringstream
&
data
)
{
if
(
!
stream
.
is_open
())
stream
.
open
(
makeLogFile
(
*
this
).
c_str
());
if
(
lastFunction
!=
function
)
{
if
(
!
lastFunction
.
empty
())
...
...
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment