Extract helpers (from container.sharder) that formats log
context from either a broker (preferring broker.path/db_file)
or a plain db_file string. Use it in common.db_replicator and
container.replicator so messages are uniform and robust.
Update tests to cover both cases.
No functional changes to replication behavior; this is
logging/robustness and test updates only.
Change-Id: I289d3e9b6fe14159925786732ad748acd0459812
Related-Change: I7d2fe064175f002055054a72f348b87dc396772b
Signed-off-by: ashnair <ashnair@nvidia.com>