[syslog-ng] Pattern database and '<'

Jakub Jankowski shasta at toxcorp.com
Fri Jul 23 11:55:43 CEST 2010


On 2010-07-23, Ilas, Yann wrote:

> Currently, I'm using syslog-ng version 3.1.1.
> I would like to parse that kind of message by using pattern database.
> Here is the message : "<<<<< Message message message".
> So I created that xml file :
[...]
>         <pattern><<<<< Message message message</pattern>
[...]
> I obtain that message when I try to parse with the pdbtool application :
> $ pdbtool match -p syslog-ng.xml -P test -M "<<<<< Message message
> message"
> Error parsing pattern database file; filename='/tmp/syslog-ng.xml',
> error='Error on line 9 char 22: \'<\' is not a valid character following
> a \'<\' character; it may not begin an element name'
>
> Into the xml file, I replaced '<<<<<' with @STRING::@ or @ESTRING...@
> but it doesn't work. Is it possible to match that kind of message ?

Characters < and > are special to XML notation. Try using &lt; and 
&gt; instead.


HTH

-- 
Jakub Jankowski|shasta at toxcorp.com|http://toxcorp.com/
GPG: FCBF F03D 9ADB B768 8B92 BB52 0341 9037 A875 942D


More information about the syslog-ng mailing list