]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commit
cephadm: move colored output support into logging.py
authorJohn Mulligan <jmulligan@redhat.com>
Tue, 22 Aug 2023 16:42:14 +0000 (12:42 -0400)
committerJohn Mulligan <jmulligan@redhat.com>
Tue, 19 Sep 2023 20:16:55 +0000 (16:16 -0400)
commit8707879408190cb81793c1f34de89218ef73904c
tree9ae380865f21997eb6edd7d712ad5059e19886cc
parent24d95fda2306160690975bb971c235a0e68ea9dc
cephadm: move colored output support into logging.py

Rewrite cephadm's colored output support such that it abstracts away
the colorization into extra logging metadata. The new code will not
unconditionally put control characters into the log files. It will
only print the control chars if the stderr is a tty.
In theory this is probably more future proof as well, but it's only
got two callers so it is hard to say how useful it'll be.

Signed-off-by: John Mulligan <jmulligan@redhat.com>
src/cephadm/cephadm.py
src/cephadm/cephadmlib/logging.py