Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
snf-ganeti
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
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
itminedu
snf-ganeti
Commits
a5eb7789
Commit
a5eb7789
authored
16 years ago
by
Iustin Pop
Browse files
Options
Downloads
Patches
Plain Diff
Convert mcpu.py to use the logging module
Reviewed-by: imsnah
parent
23828f1c
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
lib/mcpu.py
+4
-4
4 additions, 4 deletions
lib/mcpu.py
with
4 additions
and
4 deletions
lib/mcpu.py
+
4
−
4
View file @
a5eb7789
...
...
@@ -28,13 +28,13 @@ are two kinds of classes defined:
"""
import
logging
from
ganeti
import
opcodes
from
ganeti
import
constants
from
ganeti
import
errors
from
ganeti
import
rpc
from
ganeti
import
cmdlib
from
ganeti
import
logger
from
ganeti
import
locking
...
...
@@ -217,14 +217,14 @@ class Processor(object):
"""
Log a change in LU execution progress.
"""
logg
er
.
D
ebug
(
"
Step %d/%d %s
"
%
(
current
,
total
,
message
)
)
logg
ing
.
d
ebug
(
"
Step %d/%d %s
"
,
current
,
total
,
message
)
self
.
_feedback_fn
(
"
STEP %d/%d %s
"
%
(
current
,
total
,
message
))
def
LogWarning
(
self
,
message
,
hint
=
None
):
"""
Log a warning to the logs and the user.
"""
logg
er
.
Error
(
message
)
logg
ing
.
warning
(
message
)
self
.
_feedback_fn
(
"
- WARNING: %s
"
%
message
)
if
hint
:
self
.
_feedback_fn
(
"
Hint: %s
"
%
hint
)
...
...
@@ -233,7 +233,7 @@ class Processor(object):
"""
Log an informational message to the logs and the user.
"""
logg
er
.
I
nfo
(
message
)
logg
ing
.
i
nfo
(
message
)
self
.
_feedback_fn
(
"
- INFO: %s
"
%
message
)
...
...
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