Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/azure/cli/commands/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
#---------------------------------------------------------------------------------------------

from __future__ import print_function
import sys
import json
import time
import traceback
Expand Down Expand Up @@ -89,7 +90,7 @@ def _delay(self):
time.sleep(self.poll_interval_ms / 1000.0)

def __call__(self, poller):
Copy link
Contributor

@yugangw-msft yugangw-msft Aug 1, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i like this change personally, but for the people get used to interactive flow, is it possible we can still output the starting message, but just don't prefix with "warning:"?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

'WARNING:' is not displayed in interactive mode (if there's a TTY available).
But log message are prefixed with the log level if there is no TTY (e.g. redirecting the output to file) as was the case in #572.

logger.warning(self.start_msg)
print(self.start_msg, file=sys.stderr)
logger.info("Starting long running operation '%s' with polling interval %s ms",
self.start_msg, self.poll_interval_ms)
while not poller.done():
Expand All @@ -110,7 +111,6 @@ def __call__(self, poller):

logger.info("Long running operation '%s' completed with result %s",
self.start_msg, result)
logger.warning(self.finish_msg)
return result

class DeploymentOutputLongRunningOperation(LongRunningOperation): #pylint: disable=too-few-public-methods
Expand Down