Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
dune-xt
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
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
Code review analytics
Issue analytics
Insights
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
ag-ohlberger
dune-community
dune-xt
Commits
005a5ff8
Commit
005a5ff8
authored
5 years ago
by
Dr. Felix Tobias Schindler
Browse files
Options
Downloads
Patches
Plain Diff
[python] allow for multiple init_logger() calls
parent
e2cc5918
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
dune/xt/common/exceptions.hh
+3
-0
3 additions, 0 deletions
dune/xt/common/exceptions.hh
dune/xt/common/python.cc
+3
-0
3 additions, 0 deletions
dune/xt/common/python.cc
dune/xt/common/timedlogging.cc
+1
-2
1 addition, 2 deletions
dune/xt/common/timedlogging.cc
with
7 additions
and
2 deletions
dune/xt/common/exceptions.hh
+
3
−
0
View file @
005a5ff8
...
@@ -148,6 +148,9 @@ class dependency_missing : public Dune::Exception
...
@@ -148,6 +148,9 @@ class dependency_missing : public Dune::Exception
class
this_should_not_happen
:
public
Dune
::
InvalidStateException
class
this_should_not_happen
:
public
Dune
::
InvalidStateException
{};
{};
class
logger_error
:
public
Dune
::
Exception
{};
}
// namespace Exceptions
}
// namespace Exceptions
...
...
This diff is collapsed.
Click to expand it.
dune/xt/common/python.cc
+
3
−
0
View file @
005a5ff8
...
@@ -47,8 +47,11 @@ void add_initialization(pybind11::module& m, std::string logger_name)
...
@@ -47,8 +47,11 @@ void add_initialization(pybind11::module& m, std::string logger_name)
const
std
::
string
&
info_color
,
const
std
::
string
&
info_color
,
const
std
::
string
&
debug_color
,
const
std
::
string
&
debug_color
,
const
std
::
string
&
warning_color
)
{
const
std
::
string
&
warning_color
)
{
try
{
Dune
::
XT
::
Common
::
TimedLogger
().
create
(
Dune
::
XT
::
Common
::
TimedLogger
().
create
(
max_info_level
,
max_debug_level
,
enable_warnings
,
enable_colors
,
info_color
,
debug_color
,
warning_color
);
max_info_level
,
max_debug_level
,
enable_warnings
,
enable_colors
,
info_color
,
debug_color
,
warning_color
);
}
catch
(
Dune
::
XT
::
Common
::
Exceptions
::
logger_error
&
)
{
}
},
},
"max_info_level"
_a
=
std
::
numeric_limits
<
ssize_t
>::
max
(),
"max_info_level"
_a
=
std
::
numeric_limits
<
ssize_t
>::
max
(),
"max_debug_level"
_a
=
std
::
numeric_limits
<
ssize_t
>::
max
(),
"max_debug_level"
_a
=
std
::
numeric_limits
<
ssize_t
>::
max
(),
...
...
This diff is collapsed.
Click to expand it.
dune/xt/common/timedlogging.cc
+
1
−
2
View file @
005a5ff8
...
@@ -95,8 +95,7 @@ void TimedLogging::create(const ssize_t max_info_level,
...
@@ -95,8 +95,7 @@ void TimedLogging::create(const ssize_t max_info_level,
const
std
::
string
warning_color
)
const
std
::
string
warning_color
)
{
{
DUNE_UNUSED
std
::
lock_guard
<
std
::
mutex
>
guard
(
mutex_
);
DUNE_UNUSED
std
::
lock_guard
<
std
::
mutex
>
guard
(
mutex_
);
if
(
created_
)
DUNE_THROW_IF
(
created_
,
Exceptions
::
logger_error
,
"Do not call create() more than once!"
);
DUNE_THROW
(
Exceptions
::
you_are_using_this_wrong
,
"Do not call create() more than once!"
);
max_info_level_
=
max_info_level
;
max_info_level_
=
max_info_level
;
max_debug_level_
=
max_debug_level
;
max_debug_level_
=
max_debug_level
;
enable_warnings_
=
enable_warnings
;
enable_warnings_
=
enable_warnings
;
...
...
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