From 2791d32e7ce07f6cf9d14481b26c86faf64d6d1b Mon Sep 17 00:00:00 2001 From: Daniel Berteaud Date: Wed, 27 Mar 2019 22:54:27 +0100 Subject: [PATCH] Allow _ and - in extended messages key names --- systemd-journal-gelf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/systemd-journal-gelf b/systemd-journal-gelf index 3f8ccbb..bc68ce7 100644 --- a/systemd-journal-gelf +++ b/systemd-journal-gelf @@ -168,7 +168,7 @@ while ( my $entry = ){ # OR # # gelf(~):code=200~url=/index.html~remote_ip=10.99.5.12~referer=http://test.local/ - if ( $msg->{MESSAGE} =~ m/^gelf(\([^\(\)]+\))?:([a-zA-Z\d]+=([^\|])\|?)+/ ){ + if ( $msg->{MESSAGE} =~ m/^gelf(\([^\(\)]+\))?:([a-zA-Z\d_\-]+=([^\|])\|?)+/ ){ $msg->{MESSAGE} =~ s/^gelf(\([^\(\)]+\))?://; my $separator = ($1 && length $1 > 0) ? qr{$1} : qr{\|}; foreach ( split /$separator/, $msg->{MESSAGE} ){