Skip to content

Commit ec51f22

Browse files
author
avandras
committed
Make log messages more human digestible
1 parent 10c1bc4 commit ec51f22

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

patroni/multisite.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,8 @@ def is_follower(self):
202202
return cfg is not None and 'host' in cfg
203203

204204
def _set_standby_config(self, other: Member):
205-
logger.info(f"Multisite replicate from {other}")
205+
other_address = ','.join([':'.join([i, other.data['port']]) for i in other.data['host']])
206+
logger.info(f"Multisite standby leader is replicating from {other.name} ({other_address})")
206207
# TODO: add support for replication slots
207208
try:
208209

@@ -416,7 +417,8 @@ def touch_member(self):
416417
'host': self.config['host'],
417418
'port': self.config['port'],
418419
}
419-
logger.info(f"Touching member {self.name} with {data!r}")
420+
address = ','.join([':'.join([i, data['port']]) for i in data['host'].split(',')])
421+
logger.info(f"Registering site {self.name} in DCS with address {address}")
420422
self.dcs.touch_member(data)
421423

422424
def run(self):

0 commit comments

Comments
 (0)