fix writeCrashReport() typo (#3218)

This commit is contained in:
Danilo Nascimento 2025-07-10 02:36:02 +02:00 committed by GitHub
parent 7ccffb50da
commit 143ec4ccd5
2 changed files with 2 additions and 2 deletions

View file

@ -25,7 +25,7 @@ func (lw *LogWriter) Write(m []byte) (n int, err error) {
if crashRegex.MatchString(message) { if crashRegex.MatchString(message) {
logger.Debug("Core crash detected:\n", message) logger.Debug("Core crash detected:\n", message)
lw.lastLine = message lw.lastLine = message
err1 := writeCrachReport(m) err1 := writeCrashReport(m)
if err1 != nil { if err1 != nil {
logger.Error("Unable to write crash report:", err1) logger.Error("Unable to write crash report:", err1)
} }

View file

@ -242,7 +242,7 @@ func (p *process) Stop() error {
return p.cmd.Process.Signal(syscall.SIGTERM) return p.cmd.Process.Signal(syscall.SIGTERM)
} }
func writeCrachReport(m []byte) error { func writeCrashReport(m []byte) error {
crashReportPath := config.GetBinFolderPath() + "/core_crash_" + time.Now().Format("20060102_150405") + ".log" crashReportPath := config.GetBinFolderPath() + "/core_crash_" + time.Now().Format("20060102_150405") + ".log"
return os.WriteFile(crashReportPath, m, os.ModePerm) return os.WriteFile(crashReportPath, m, os.ModePerm)
} }