On Fri, 2009-02-06 at 08:04 -0700, RB wrote: > On Fri, Feb 6, 2009 at 05:14, Rainer Gerhards <[email protected]> > wrote: > > So let me ask: why exactly would you like to have a log files like this > > > > log-2009-02-06-11-12 > > log-2009-02-06-17-12 > > > > I thought what you would be interested in is that the first file was > > created at 1112 hrs while the later was created at 1712 hrs. > > The point wouldn't necessarily be to have timestamped filenames, but > to facilitate at-will rotation, either by HUP or by size. I honestly > wouldn't care if the filenames just had an incrementing identifier, > like a '%$fileno%' property that incremented with each close/reopen > cycle (bonus points for skipping already-existing files). > Generalizing the problem to the idea of less-dynamic templates was the > next step of my thought process and seemed more interesting than just > adding another [potentially less reliable and portable] property.
Ah, OK, I begin to understand. So what you are actually after is kind of a unique file identifier. I have updates for omfile on my mind which would go in a direction that, I think, is close. One of the things is that I would like to enable the output writer to start new files when, for example - a specific period of time has elapsed - a specific file size has been reached - a specific number of messages has been logged ... I intended to work on the size issue first and use the stream class that was originally developed for the queue. That class supports automatic file naming and numbering (that's how the queue files are generated). It can be set to circular logging (used by the queue, with a modul of 1,000,000 if I remember correctly out of my head) or monotonically increasing file numbers (up to the long long modul). Does this go into the same direction? > > > If I get what the point in it is, I may come up with another solution. > > Again, I'm just brainstorming. If you think it's worthwhile to pursue > now, by all means go for it; I'm just trying to find ways to make my > life easier. You are were welcome. The more use cases I know, the easier it is to do things in the right direction when I change something. Rainer > _______________________________________________ > rsyslog mailing list > http://lists.adiscon.net/mailman/listinfo/rsyslog > http://www.rsyslog.com _______________________________________________ rsyslog mailing list http://lists.adiscon.net/mailman/listinfo/rsyslog http://www.rsyslog.com

