From 02c46b6d811765904ee3042a0240e910d70eb7e3 Mon Sep 17 00:00:00 2001 From: Sebastian Wagner Date: Wed, 22 Apr 2020 18:26:13 +0200 Subject: [PATCH] cephadm: improve warn message make it more fancy! Signed-off-by: Sebastian Wagner Co-authored-by: Michael Fritch --- src/cephadm/cephadm | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/cephadm/cephadm b/src/cephadm/cephadm index dfce8eb26d24..44a62f8adb85 100755 --- a/src/cephadm/cephadm +++ b/src/cephadm/cephadm @@ -1082,10 +1082,12 @@ def _get_default_image(): if DEFAULT_IMAGE_IS_MASTER: yellow = '\033[93m' end = '\033[0m' - s = '{}Warning: This is a development version of cephadm. Please refer to https://docs.ceph.com/docs/{}/cephadm/install{}'.format( - yellow, LATEST_STABLE_RELEASE, end - ) - print(s) + warn = '''This is a development version of cephadm. +For information regarding the latest stable release: + https://docs.ceph.com/docs/{}/cephadm/install +'''.format(LATEST_STABLE_RELEASE) + for line in warn.splitlines(): + logger.warning('{}{}{}'.format(yellow, line, end)) return DEFAULT_IMAGE def infer_image(func): -- 2.47.3