Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
dtk
dtk
Commits
f563132e
Commit
f563132e
authored
Apr 24, 2012
by
NICLAUSSE Nicolas
Browse files
add method to set level using a qstring
parent
c1664db5
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/dtkLog/dtkLogger.cpp
View file @
f563132e
...
...
@@ -4,9 +4,9 @@
* Copyright (C) 2008-2011 - Julien Wintz, Inria.
* Created: Thu Mar 1 17:19:52 2012 (+0100)
* Version: $Id$
* Last-Updated:
Wed Apr 4 10:23
:5
9
2012 (+0200)
* By:
tkloczko
* Update #:
94
* Last-Updated:
mar. avril 24 15:04
:5
0
2012 (+0200)
* By:
Nicolas Niclausse
* Update #:
101
*/
/* Commentary:
...
...
@@ -38,6 +38,23 @@ void dtkLogger::setLevel(dtkLog::Level level)
d
->
level
=
level
;
}
void
dtkLogger
::
setLevel
(
QString
level
)
{
if
(
level
==
"trace"
)
d
->
level
=
dtkLog
::
Trace
;
else
if
(
level
==
"debug"
)
d
->
level
=
dtkLog
::
Debug
;
else
if
(
level
==
"info"
)
d
->
level
=
dtkLog
::
Info
;
else
if
(
level
==
"warn"
)
d
->
level
=
dtkLog
::
Warn
;
else
if
(
level
==
"error"
)
d
->
level
=
dtkLog
::
Error
;
else
if
(
level
==
"fatal"
)
d
->
level
=
dtkLog
::
Fatal
;
}
void
dtkLogger
::
attachConsole
(
void
)
{
d
->
destinations
<<
d
->
console
;
...
...
src/dtkLog/dtkLogger.h
View file @
f563132e
...
...
@@ -4,9 +4,9 @@
* Copyright (C) 2008-2011 - Julien Wintz, Inria.
* Created: Thu Mar 1 17:18:31 2012 (+0100)
* Version: $Id$
* Last-Updated:
Wed Apr
4 1
0
:0
3:36
2012 (+0200)
* By:
tkloczko
* Update #: 3
2
* Last-Updated:
mar. avril 2
4 1
5
:0
2:52
2012 (+0200)
* By:
Nicolas Niclausse
* Update #: 3
3
*/
/* Commentary:
...
...
@@ -40,6 +40,7 @@ public:
public:
void
setLevel
(
dtkLog
::
Level
level
);
void
setLevel
(
QString
level
);
public:
void
attachConsole
(
void
);
...
...
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