Re: newsyslog patch implementing file includes

2010-04-28 Thread kama


On Thu, 22 Apr 2010, krad wrote:

> On 22 April 2010 08:33, Alex Keda  wrote:
>
> > 22.04.2010 11:29, Gordon Tetlow ?:
> >
> >> On Thu, Apr 22, 2010 at 12:17 AM, Alex Keda  >> ad...@lissyara.su>> wrote:
> >>
> >>It's need feature. I test patch - it work for me (CURRENT, amd64)
> >>Can I use some as:
> >> /path/to/dir/*.conf
> >>?
> >>and can I create recursive include?
> >>
> >>
> >> Yes, wildcards and recursive includes are supported.
> >>
> > great job!
> > Thanks!
> >
> >
> > ___
> > freebsd-current@freebsd.org mailing list
> > http://lists.freebsd.org/mailman/listinfo/freebsd-current
> > To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"
> >
>
>
> i would be real nice is newsyslog also supported a date based file renaming
> shceme rather than the cyclic 0,1,2,3, much like the datext option in
> logrotate. eg
>
> messages
> messages.20100422
> messages.20100421
> messages.20100420
> ...
>
> The cyclic renaming is a pain for incremental backups as all the log files
> are backed up every time as their contents changes compared to their
> filename

Even nicer if it could use the strftime() syntax format. ie: %Y%m%d to get
the date. This way it could also be named in week number.

/Bjorn
___
freebsd-current@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"


Re: newsyslog patch implementing file includes

2010-04-23 Thread Brandon Gooch
On Sat, Apr 24, 2010 at 2:57 AM, Garance A Drosehn  wrote:
> At 10:15 AM +0100 4/22/10, krad wrote:
>>
>> On 22 April 2010 08:33, Alex Keda  wrote:
>>
>>>  22.04.2010 11:29, Gordon Tetlow ?:
>>>
  On Thu, Apr 22, 2010 at 12:17 AM, Alex Keda >>>  ad...@lissyara.su>> wrote:

    It's need feature. I test patch - it work for me (CURRENT, amd64)
    Can I use some as:
     /path/to/dir/*.conf
    ?
    and can I create recursive include?


  Yes, wildcards and recursive includes are supported.

>>>  great job!
>>
>>  > Thanks!
>
> I also think this is a great feature to add.
>
> Just to be clear:  This allows a config file to include some other
> file, and that other file can also include more files with additional
> newsyslog entries.  In that sense it allows recursive includes.
>
> Note that it will detect when such recursion causes one file to end
> up indirectly including itself, and will reject *that* situation.
> So you shouldn't be able to get into an infinite loop of included
> files.

This sounds cool; I've ever ran into a situation where I needed this -- yet.

Although I'm sure when it's in the tree and available, I'll not be
able to live without it :)

>> i would be real nice is newsyslog also supported a date based file
>> renaming
>> shceme rather than the cyclic 0,1,2,3, much like the datext option in
>> logrotate. eg
>>
>> messages
>> messages.20100422
>> messages.20100421
>> messages.20100420
>> ...
>>
>> The cyclic renaming is a pain for incremental backups as all the log files
>> are backed up every time as their contents changes compared to their
>> filename
>
> I hope to do this after Gordon commits the new feature that he's
> implemented. I know I've said that before, but I do have some
> vacation time coming up soon and expect to do it then.
>
> --
> Garance Alistair Drosehn     =               dros...@rpi.edu
> Senior Systems Programmer               or   g...@freebsd.org
> Rensselaer Polytechnic Institute;             Troy, NY;  USA

This would indeed be a very welcome feature. I've been trying to
devise a method (and the logic) to do something similar recently...

I wonder, what might the time-frame be for adding the above feature? A
"guess-timate" would be OK :)

-Brandon
___
freebsd-current@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"


Re: newsyslog patch implementing file includes

2010-04-23 Thread Garance A Drosehn

At 10:15 AM +0100 4/22/10, krad wrote:

On 22 April 2010 08:33, Alex Keda  wrote:


 22.04.2010 11:29, Gordon Tetlow ?:


 On Thu, Apr 22, 2010 at 12:17 AM, Alex Keda > wrote:

It's need feature. I test patch - it work for me (CURRENT, amd64)
Can I use some as:
 /path/to/dir/*.conf
?
and can I create recursive include?


 Yes, wildcards and recursive includes are supported.


 great job!

 > Thanks!


I also think this is a great feature to add.

Just to be clear:  This allows a config file to include some other
file, and that other file can also include more files with additional
newsyslog entries.  In that sense it allows recursive includes.

Note that it will detect when such recursion causes one file to end
up indirectly including itself, and will reject *that* situation.
So you shouldn't be able to get into an infinite loop of included
files.


i would be real nice is newsyslog also supported a date based file renaming
shceme rather than the cyclic 0,1,2,3, much like the datext option in
logrotate. eg

messages
messages.20100422
messages.20100421
messages.20100420
...

The cyclic renaming is a pain for incremental backups as all the log files
are backed up every time as their contents changes compared to their
filename


I hope to do this after Gordon commits the new feature that he's
implemented. I know I've said that before, but I do have some
vacation time coming up soon and expect to do it then.

--
Garance Alistair Drosehn =   dros...@rpi.edu
Senior Systems Programmer   or   g...@freebsd.org
Rensselaer Polytechnic Institute; Troy, NY;  USA
___
freebsd-current@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"


Re: newsyslog patch implementing file includes

2010-04-22 Thread Gordon Tetlow
On Thu, Apr 22, 2010 at 6:26 AM, John Baldwin  wrote:

> This is a great feature!  One suggestion, I think this text in the new
> manpage
> isn't quite right:
>
>  Name of the system log file to be archived, the literal string "default",
>  or "include".
>
> I think it's ambiguous about "include" also being a literal string.  Two
> possible suggestions:
>
>  Name of the system log file to be archived, or one of the literal strings
>  "default" or "include".
>
>  Name of the system log file to be archived, the literal string "default",
>  or the literal string "include".
>

I took your first suggestion and updated the patch.

Thanks,
Gordon
___
freebsd-current@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"


Re: newsyslog patch implementing file includes

2010-04-22 Thread John Baldwin
On Wednesday 21 April 2010 11:55:44 pm Gordon Tetlow wrote:
> I wanted the ability for a port to have a rotating log policy so I wrote a
> patch for newsyslog to implement includes of other newsyslog.conf style
> files.
> 
> Please find the patch at:
> 
http://people.freebsd.org/~gordon/patches/newsyslog.diff
> 
> Format for the include line in /etc/newsyslog.conf is:
>  /etc/defaults/newsyslog.conf
> 
> Here's a quick overview of the changes:
> Convert the conf_entry struct from using a home rolled linked list to the
> queue(3) macros.
> Add a STAILQ to process include files.
> Add support for  tag to specify include files.
> Globbing is supported in  statements.
> Properly detect circular include loop dependencies.
> 
> Please take a look and send me any comments you might have.

This is a great feature!  One suggestion, I think this text in the new manpage 
isn't quite right:

  Name of the system log file to be archived, the literal string "default",
  or "include".

I think it's ambiguous about "include" also being a literal string.  Two 
possible suggestions:

  Name of the system log file to be archived, or one of the literal strings
  "default" or "include".

  Name of the system log file to be archived, the literal string "default",
  or the literal string "include".

-- 
John Baldwin
___
freebsd-current@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"


Re: newsyslog patch implementing file includes

2010-04-22 Thread Gordon Tetlow
On Thu, Apr 22, 2010 at 12:17 AM, Alex Keda  wrote:

> It's need feature. I test patch - it work for me (CURRENT, amd64)
> Can I use some as:
>  /path/to/dir/*.conf
> ?
> and can I create recursive include?
>

Yes, wildcards and recursive includes are supported.

Gordon
___
freebsd-current@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"


Re: newsyslog patch implementing file includes

2010-04-22 Thread krad
On 22 April 2010 08:33, Alex Keda  wrote:

> 22.04.2010 11:29, Gordon Tetlow ?:
>
>> On Thu, Apr 22, 2010 at 12:17 AM, Alex Keda > ad...@lissyara.su>> wrote:
>>
>>It's need feature. I test patch - it work for me (CURRENT, amd64)
>>Can I use some as:
>> /path/to/dir/*.conf
>>?
>>and can I create recursive include?
>>
>>
>> Yes, wildcards and recursive includes are supported.
>>
> great job!
> Thanks!
>
>
> ___
> freebsd-current@freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-current
> To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"
>


i would be real nice is newsyslog also supported a date based file renaming
shceme rather than the cyclic 0,1,2,3, much like the datext option in
logrotate. eg

messages
messages.20100422
messages.20100421
messages.20100420
...

The cyclic renaming is a pain for incremental backups as all the log files
are backed up every time as their contents changes compared to their
filename
___
freebsd-current@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"


Re: newsyslog patch implementing file includes

2010-04-22 Thread Alex Keda

22.04.2010 11:29, Gordon Tetlow ?:
On Thu, Apr 22, 2010 at 12:17 AM, Alex Keda > wrote:


It's need feature. I test patch - it work for me (CURRENT, amd64)
Can I use some as:
 /path/to/dir/*.conf
?
and can I create recursive include?


Yes, wildcards and recursive includes are supported.

great job!
Thanks!

___
freebsd-current@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"


Re: newsyslog patch implementing file includes

2010-04-22 Thread Alex Keda

22.04.2010 07:55, Gordon Tetlow пишет:

I wanted the ability for a port to have a rotating log policy so I wrote a
patch for newsyslog to implement includes of other newsyslog.conf style
files.

Please find the patch at:
http://people.freebsd.org/~gordon/patches/newsyslog.diff

Format for the include line in /etc/newsyslog.conf is:
  /etc/defaults/newsyslog.conf

Here's a quick overview of the changes:
Convert the conf_entry struct from using a home rolled linked list to the
queue(3) macros.
Add a STAILQ to process include files.
Add support for  tag to specify include files.
Globbing is supported in  statements.
Properly detect circular include loop dependencies.

Please take a look and send me any comments you might have.

It's need feature. I test patch - it work for me (CURRENT, amd64)
Can I use some as:
 /path/to/dir/*.conf
?
and can I create recursive include?
___
freebsd-current@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"


newsyslog patch implementing file includes

2010-04-21 Thread Gordon Tetlow
I wanted the ability for a port to have a rotating log policy so I wrote a
patch for newsyslog to implement includes of other newsyslog.conf style
files.

Please find the patch at:
http://people.freebsd.org/~gordon/patches/newsyslog.diff

Format for the include line in /etc/newsyslog.conf is:
 /etc/defaults/newsyslog.conf

Here's a quick overview of the changes:
Convert the conf_entry struct from using a home rolled linked list to the
queue(3) macros.
Add a STAILQ to process include files.
Add support for  tag to specify include files.
Globbing is supported in  statements.
Properly detect circular include loop dependencies.

Please take a look and send me any comments you might have.

Thanks,
Gordon
___
freebsd-current@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"


newsyslog patch implementing file includes

2010-04-20 Thread Gordon Tetlow
I wanted the ability for a port to have a rotating log policy so I wrote a
patch for newsyslog to implement includes of other newsyslog.conf style
files.

Please find the patch at:
http://people.freebsd.org/~gordon/patches/newsyslog.diff

Format for the include line in /etc/newsyslog.conf is:
 /etc/defaults/newsyslog.conf

Here's a quick overview of the changes:
Convert the conf_entry struct from using a home rolled linked list to the
queue(3) macros.
Add a STAILQ to process include files.
Add support for  tag to specify include files.
Globbing is supported in  statements.
Properly detect circular include loop dependencies.

Please take a look and send me any comments you might have.

Thanks,
Gordon
___
freebsd-current@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"