This sounds useful, at least for some use cases. However, this most probably
requires considerable changes to the config engine. And as this engine is
scheduled to be replaced, I don't like to touch it too much.

However, there may be one solution. We could declare something like "if the
file name is defined as a template name, then make it a dynafile based on
that template".

Then, you would need to define templates e.g 

$template /var/log/messages,"/var/log/messages_%$NoW%"

And  those would automatically be converted. That seems to require relatively
few changes.

Would that help?

Rainer

> -----Original Message-----
> From: [email protected] [mailto:rsyslog-
> [email protected]] On Behalf Of martin f krafft
> Sent: Tuesday, February 01, 2011 8:36 PM
> To: [email protected]
> Cc: rsyslog-users; [email protected]
> Subject: Re: [rsyslog] Appending a timestamp to all log files
> 
> also sprach [email protected] <[email protected]> [2011.02.01.1957 +0100]:
> > rsyslog already has the include directive to include files (or all
> > files in a directory)
> >
> > does this work for you? if not, what does it lack?
> 
> Hello David,
> 
> thanks for your time in writing back. Unfortunately, I think I was
> unclear about what I am trying to do.
> 
> I am aware of the include directive. It has nothing to do with my
> goals.
> 
> I am trying to tell rsyslog: "hey, all files that you write, append the
> following suffix to their names!", or "hey, all files that you write,
> run their names through this filter and use the output as actual
> filename!".
> 
> I want this because it's a cleaner way to replace all hard-coded
> filenames with templated filenames, than to change every instance of a
> hard-coded filename.
> 
> Am I making myself clearer now?
> 
> --
> martin;              (greetings from the heart of the sun.)
>   \____ echo mailto: !#^."<*>"|tr "<*> mailto:"; net@madduck
> 
> logik ist analsadismus: gedanken werden gewaltsam durch einen engen
> gang gepreßt.
>                                                     -- frei nach lacan
> 
> spamtraps: [email protected]
_______________________________________________
rsyslog mailing list
http://lists.adiscon.net/mailman/listinfo/rsyslog
http://www.rsyslog.com

Reply via email to