[syslog-ng]Feature Request

Chad C. Walstrom chewie@wookimus.net
Sun, 1 Apr 2001 03:27:15 -0500


> > where you can specify what your escape character should be and
> > which characters it should apply to.  Something like:
> > 
> >     destination{ file("/tmp/blah" template( "$MSG" escape("\")
> >         to-escape("'\"\\") ) ); };
> 
> That seems like overkill.  You need an external program to catch the
> data/SQL statements anyway and insert the data/run the SQL
> statements.  Why not output the data as data, and have the external
> program deal with generating your SQL statements while escaping any
> characters you need escaped?

Step away from the idea that I'll be making SQL statements for a
moment, and think in terms of passing data from one program to
another.  Syslog and syslog-ng are wonderful for collecting log
entries from various sources and redirecting them to new destinations
-- and we're familiar with syslog-ng's flexibility in these terms.

So, the question is not "can I 'escape' the string data in another
program," rather "should I have to 'escape' the string data in another
program?"  I would argue that there are times when syslog-ng is the
best place to tie in the output templates with actual output format,
including escaped characters in message text.  It ties in very well
logically.  syslog-ng knows what the data is.  It has control of each
atomic part.  It's job is to output that data to a number of
destinations, and now, in customizable formats.  It makes sense to
finish the job of data presentation at this layer.

hmm...  You know.  I've got a lot of ideas to mull over a couple dozen
times and to test out.  I do think this very simple and very useful
functionality to the output format is not an unnecessary feature, but
I do agree that you can get by without it.

-- 
Chad Walstrom <chewie@wookimus.net>                 | a.k.a. ^chewie
http://www.wookimus.net/                            | s.k.a. gunnarr
Key fingerprint = B4AB D627 9CBD 687E 7A31  1950 0CC7 0B18 206C 5AFD