MM-48345: Fix Critical level logging (#21952)
Critical wasn't added in the StdLevels slice and due to that mlog.Critical wasn't printing anything. This was a complete blindspot that was missed. We have removed all references to mlog.Critical in the codebase and pointed Critical to be Fatal in the library. In v8, we will remove Critical altogether. ```release-note Servers with an encrypted key will throw an error during startup now. ```
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
1353ebc3ab
Коммит
6ad1861535
@@ -333,7 +333,7 @@ func extractBinary(executablePath string, filename string) error {
|
||||
if err != nil {
|
||||
err2 := os.Rename(tmpFileName, executablePath)
|
||||
if err2 != nil {
|
||||
mlog.Critical("Unable to restore the backup of the executable file. Restore the executable file manually.")
|
||||
mlog.Fatal("Unable to restore the backup of the executable file. Restore the executable file manually.")
|
||||
return errors.Wrap(err2, "critical error: unable to upgrade the binary or restore the old binary version. Please restore it manually")
|
||||
}
|
||||
return err
|
||||
@@ -342,13 +342,13 @@ func extractBinary(executablePath string, filename string) error {
|
||||
if _, err = io.Copy(outFile, tarReader); err != nil {
|
||||
err2 := os.Remove(executablePath)
|
||||
if err2 != nil {
|
||||
mlog.Critical("Unable to restore the backup of the executable file. Restore the executable file manually.")
|
||||
mlog.Fatal("Unable to restore the backup of the executable file. Restore the executable file manually.")
|
||||
return errors.Wrap(err2, "critical error: unable to upgrade the binary or restore the old binary version. Please restore it manually")
|
||||
}
|
||||
|
||||
err2 = os.Rename(tmpFileName, executablePath)
|
||||
if err2 != nil {
|
||||
mlog.Critical("Unable to restore the backup of the executable file. Restore the executable file manually.")
|
||||
mlog.Fatal("Unable to restore the backup of the executable file. Restore the executable file manually.")
|
||||
return errors.Wrap(err2, "critical error: unable to upgrade the binary or restore the old binary version. Please restore it manually")
|
||||
}
|
||||
return err
|
||||
|
||||
Ссылка в новой задаче
Block a user