refactor: no more pmapifactory

This commit is contained in:
James Houlahan
2020-04-08 13:07:13 +02:00
parent 5bf4d9c6f5
commit db02eb694d
22 changed files with 70 additions and 76 deletions

View File

@ -54,13 +54,6 @@ var logFile *os.File //nolint[gochecknoglobals]
var logFileRgx = regexp.MustCompile("^v.*\\.log$") //nolint[gochecknoglobals]
var logCrashRgx = regexp.MustCompile("^v.*_crash_.*\\.log$") //nolint[gochecknoglobals]
// GetLogEntry returns logrus.Entry with PID and `packageName`.
func GetLogEntry(packageName string) *logrus.Entry {
return logrus.WithFields(logrus.Fields{
"pkg": packageName,
})
}
// HandlePanic reports the crash to sentry or local file when sentry fails.
func HandlePanic(cfg *Config, output string) {
if !cfg.IsDevMode() {