Skip to content

Commit 23f0f0c

Browse files
committed
fix(logger): allow digits in app name when parsing log file
Fixes #909.
1 parent 4a7e7b7 commit 23f0f0c

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

logger/syslogd/syslogd.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ func fileExists(path string) (bool, error) {
4545
}
4646

4747
func getLogFile(m *syslog.Message) (io.Writer, error) {
48-
r := regexp.MustCompile(`^.* ([a-z-]+)\[[a-z0-9\.]+\].*`)
48+
r := regexp.MustCompile(`^.* ([-a-z0-9]+)\[[a-z0-9\.]+\].*`)
4949
match := r.FindStringSubmatch(m.String())
5050
if match == nil {
5151
return nil, errors.New("Could not find app name in message")

0 commit comments

Comments
 (0)