Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
gmrv
silo
Commits
2a18e5b7
Commit
2a18e5b7
authored
7 years ago
by
Pablo Toharia
Browse files
Options
Download
Email Patches
Plain Diff
Change of the class Log to Logger.
parent
60ce1dd1
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
10 deletions
+10
-10
example/siloExample.cpp
example/siloExample.cpp
+1
-1
silo.in.hpp
silo.in.hpp
+9
-9
No files found.
example/siloExample.cpp
View file @
2a18e5b7
...
...
@@ -4,7 +4,7 @@
int
main
(
void
)
{
example
::
Log
logger
(
"log"
,
std
::
cerr
,
example
::
LOG_LEVEL_VERBOSE
);
example
::
Log
ger
logger
(
"log"
,
std
::
cerr
,
example
::
LOG_LEVEL_VERBOSE
);
logger
.
log
(
"Hello log!"
,
example
::
LOG_LEVEL_VERBOSE
,
EXAMPLE_FILE_LINE
);
std
::
this_thread
::
sleep_for
(
std
::
chrono
::
seconds
(
1
));
...
...
This diff is collapsed.
Click to expand it.
silo.in.hpp
View file @
2a18e5b7
...
...
@@ -38,20 +38,20 @@ namespace @SILO_NAMESPACE@
* class to log output
*
*/
class
Log
class
Log
ger
{
public:
Log
(
const
std
::
string
&
logName_
=
""
,
std
::
ostream
&
stream_
=
std
::
cerr
,
TLogLevel
logLevel_
=
Log
ger
(
const
std
::
string
&
logName_
=
""
,
std
::
ostream
&
stream_
=
std
::
cerr
,
TLogLevel
logLevel_
=
#ifdef DEBUG
LOG_LEVEL_WARNING
LOG_LEVEL_WARNING
#else
LOG_LEVEL_ERROR
LOG_LEVEL_ERROR
#endif
,
bool
coloredOutput_
=
true
,
bool
coloredOutput_
=
true
)
:
_logName
(
logName_
)
,
_startTime
(
std
::
chrono
::
system_clock
::
now
(
))
...
...
@@ -120,7 +120,7 @@ namespace @SILO_NAMESPACE@
const
std
::
string
&
fileAndLine
=
""
)
{
#ifdef @SILO_NAME@_WITH_LOGGING
Log
::
log
(
msg
,
*
_stream
,
level
,
fileAndLine
);
this
->
log
(
msg
,
*
_stream
,
level
,
fileAndLine
);
#endif
}
...
...
This diff is collapsed.
Click to expand it.
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