[syslog-ng]Macro $MSG and '\'

Jerome Peducasse peducasse@echo.fr
Thu, 18 Apr 2002 17:25:24 +0200


OK, thanks very much.

On Thu, Apr 18, 2002 at 05:05:14PM +0200, Balazs Scheidler wrote:
> On Thu, Apr 18, 2002 at 02:47:23PM +0200, Jerome Peducasse wrote:
> > Hello,
> > 
> > 	When I use template("$DATE $HOST [$FACILITY.$LEVEL] $PROGRAM $MSG\n"), messages like:
> > Apr 16 16:02:28 xml-indexer1.conso.fr.ke.echo/xml-indexer1-0-0.conso.fr.ke.echo /ke/bin/afp.kelight[29524]: failed to init index '/ke/data/afp/group_by' in enum echo::keret echo::XmlServer::start(const char *):XmlServer.cc:235 
> > 
> > become
> > Apr 16 16:17:27 xml-indexer1.conso.fr.ke.echo [local0.err] /ke/bin/afp.kelight /ke/bin/afp.kelight[9294]: failed to init index \'/ke/data/afp/group_by\' in enum echo::keret echo::XmlServer::start(const char *):XmlServer.cc:235
> > 
> > ('/ke/data/afp/group_by' become \'/ke/data/afp/group_by\')
> > 
> 
> turn off template escapeing in your file destination:
> 
> file d_file { file("xxx" template("$MSG\n"); template_escape(off); };
> 
> it is enabled by default to avoid sending SQL data unescaped, which could
> cause nasty things on your SQL database.
> 
> -- 
> Bazsi
> PGP info: KeyID 9AF8D0A9 Fingerprint CD27 CFB0 802C 0944 9CFD 804E C82C 8EB1
> 
> _______________________________________________
> syslog-ng maillist  -  syslog-ng@lists.balabit.hu
> https://lists.balabit.hu/mailman/listinfo/syslog-ng

-- 
Jerome Peducasse
Wanadoo Portails - Sophia Antipolis