mirror of
https://github.com/cubefs/cubefs.git
synced 2026-08-02 02:00:56 +00:00
fix(flashnode): avoid unnecessary audit log printing #23112585
Signed-off-by: clinx <chenlin1@oppo.com>
This commit is contained in:
parent
e9b9b9250c
commit
41ad2fdc7d
@ -357,9 +357,11 @@ func (cb *CacheBlock) initFilePath(isLoad bool) (err error) {
|
||||
cb.notifyReady()
|
||||
}
|
||||
_, err = os.Stat(cb.filePath)
|
||||
msg := fmt.Sprintf("init cache block(%s) to local: err %v", cb.filePath, err)
|
||||
log.LogDebugf("%v", msg)
|
||||
auditlog.LogFlashNodeOp("BlockInit", msg, err)
|
||||
if !isLoad && (log.EnableDebug() || err != nil) {
|
||||
msg := fmt.Sprintf("init cache block(%s) to local: err %v", cb.filePath, err)
|
||||
log.LogDebugf("%v", msg)
|
||||
auditlog.LogFlashNodeOp("BlockInit", msg, err)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user