client/pkg/fileutil: add missing logger to {Create,Touch}DirAll

Also populate it to every invocation.

Signed-off-by: WangXiaoxiao <1141195807@qq.com>
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
This commit is contained in:
Aleksandr Razumov
2021-10-07 17:49:13 +03:00
committed by Marek Siarkowicz
parent b2821631aa
commit c91978077b
12 changed files with 25 additions and 26 deletions

View File

@@ -115,7 +115,7 @@ func Create(lg *zap.Logger, dirpath string, metadata []byte) (*WAL, error) {
}
defer os.RemoveAll(tmpdirpath)
if err := fileutil.CreateDirAll(tmpdirpath); err != nil {
if err := fileutil.CreateDirAll(lg, tmpdirpath); err != nil {
lg.Warn(
"failed to create a temporary WAL directory",
zap.String("tmp-dir-path", tmpdirpath),