Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
mpsd-software-manager
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
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
MPSD Computational Science
mpsd-software-manager
Merge requests
!29
Restructure log location
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
Restructure log location
restructure-log-location
into
main
Overview
2
Commits
48
Pipelines
20
Changes
1
Merged
Ashwin Kumar Karnad
requested to merge
restructure-log-location
into
main
1 year ago
Overview
2
Commits
48
Pipelines
20
Changes
1
Expand
Resolves
#7 (closed)
0
0
Merge request reports
Viewing commit
a07cb0f8
Prev
Next
Show latest version
1 file
+
6
−
1
Side-by-side
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
a07cb0f8
bugfix - suppress duplicate log messages
· a07cb0f8
Hans Fangohr
authored
1 year ago
mpsd-software-environment.py
+
6
−
1
Options
@@ -270,7 +270,12 @@ def set_up_logging(loglevel="warning", filename=None):
@@ -270,7 +270,12 @@ def set_up_logging(loglevel="warning", filename=None):
shell_handler
.
setFormatter
(
shell_formatter
)
shell_handler
.
setFormatter
(
shell_formatter
)
# use the log_level_numeric to decide how much logging is sent to shell
# use the log_level_numeric to decide how much logging is sent to shell
shell_handler
.
setLevel
(
log_level_numeric
)
shell_handler
.
setLevel
(
log_level_numeric
)
logger
.
addHandler
(
shell_handler
)
# Here we set the handlers of the RootLogger to be just the one we want.
# The reason is that the logging module will add a <StreamHandler <stderr>
# (NOTSET)> handler if logging.info/logging.debug/... is used before we
# come across this line. And we do not want that additional handler.
logger
.
handlers
=
[
shell_handler
]
# if filename provided, write log messages to that file, too.
# if filename provided, write log messages to that file, too.
if
filename
:
if
filename
:
Loading