Revision a5eb7789 lib/mcpu.py
b/lib/mcpu.py | ||
---|---|---|
28 | 28 |
|
29 | 29 |
""" |
30 | 30 |
|
31 |
import logging |
|
31 | 32 |
|
32 | 33 |
from ganeti import opcodes |
33 | 34 |
from ganeti import constants |
34 | 35 |
from ganeti import errors |
35 | 36 |
from ganeti import rpc |
36 | 37 |
from ganeti import cmdlib |
37 |
from ganeti import logger |
|
38 | 38 |
from ganeti import locking |
39 | 39 |
|
40 | 40 |
|
... | ... | |
217 | 217 |
"""Log a change in LU execution progress. |
218 | 218 |
|
219 | 219 |
""" |
220 |
logger.Debug("Step %d/%d %s" % (current, total, message))
|
|
220 |
logging.debug("Step %d/%d %s", current, total, message)
|
|
221 | 221 |
self._feedback_fn("STEP %d/%d %s" % (current, total, message)) |
222 | 222 |
|
223 | 223 |
def LogWarning(self, message, hint=None): |
224 | 224 |
"""Log a warning to the logs and the user. |
225 | 225 |
|
226 | 226 |
""" |
227 |
logger.Error(message)
|
|
227 |
logging.warning(message)
|
|
228 | 228 |
self._feedback_fn(" - WARNING: %s" % message) |
229 | 229 |
if hint: |
230 | 230 |
self._feedback_fn(" Hint: %s" % hint) |
... | ... | |
233 | 233 |
"""Log an informational message to the logs and the user. |
234 | 234 |
|
235 | 235 |
""" |
236 |
logger.Info(message)
|
|
236 |
logging.info(message)
|
|
237 | 237 |
self._feedback_fn(" - INFO: %s" % message) |
238 | 238 |
|
239 | 239 |
|
Also available in: Unified diff