mirror of
https://github.com/docker/compose.git
synced 2025-07-21 20:54:32 +02:00
Make container service color deterministic, remove red from chosen colors
Signed-off-by: Anthony Lai <anthonyjlai@gmail.com>
This commit is contained in:
parent
fa34ee7362
commit
802fa20228
@ -41,9 +41,9 @@ for (name, code) in get_pairs():
|
|||||||
|
|
||||||
|
|
||||||
def rainbow():
|
def rainbow():
|
||||||
cs = ['cyan', 'yellow', 'green', 'magenta', 'red', 'blue',
|
cs = ['cyan', 'yellow', 'green', 'magenta', 'blue',
|
||||||
'intense_cyan', 'intense_yellow', 'intense_green',
|
'intense_cyan', 'intense_yellow', 'intense_green',
|
||||||
'intense_magenta', 'intense_red', 'intense_blue']
|
'intense_magenta', 'intense_blue']
|
||||||
|
|
||||||
for c in cs:
|
for c in cs:
|
||||||
yield globals()[c]
|
yield globals()[c]
|
||||||
|
@ -134,7 +134,10 @@ def build_thread(container, presenter, queue, log_args):
|
|||||||
def build_thread_map(initial_containers, presenters, thread_args):
|
def build_thread_map(initial_containers, presenters, thread_args):
|
||||||
return {
|
return {
|
||||||
container.id: build_thread(container, next(presenters), *thread_args)
|
container.id: build_thread(container, next(presenters), *thread_args)
|
||||||
for container in initial_containers
|
# Container order is unspecified, so they are sorted by name in order to make
|
||||||
|
# container:presenter (log color) assignment deterministic when given a list of containers
|
||||||
|
# with the same names.
|
||||||
|
for container in sorted(initial_containers, key=lambda c: c.name)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user