etcd: enable optional log file for embedded etcd log output

In this commit we add an extra config for enabling logging to an
external file when using embedded etcd. This can be useful when running
integration tests to see more details about etcd related issues.
This commit is contained in:
Andras Banki-Horvath
2021-09-08 15:10:11 +02:00
parent 75f5b407ea
commit 6c2d8bb176
9 changed files with 23 additions and 12 deletions

View File

@@ -92,7 +92,7 @@ func (db *DB) Init(ctx context.Context, dbPath string) error {
if db.Backend == EtcdBackend && db.Etcd.Embedded {
cfg, _, err := kvdb.StartEtcdTestBackend(
dbPath, db.Etcd.EmbeddedClientPort,
db.Etcd.EmbeddedPeerPort,
db.Etcd.EmbeddedPeerPort, db.Etcd.EmbeddedLogFile,
)
if err != nil {
return err