Re: [Samba] Log rotation issue
- Date: Sat, 02 Dec 2017 18:27:11 +1300
- From: Andrew Bartlett via samba <samba@xxxxxxxxxxxxxxx>
- Subject: Re: [Samba] Log rotation issue
On Fri, 2017-12-01 at 16:06 +0530, Anantha Raghava via samba wrote:
> Continuing on the same subject, the VARIABLE SUBSTITUTIONS are not
> working. for example, I want to have the date & time attached to the
> samba log file. Hence I modified the smb.conf
> log file = /var/log/samba/samba.%T.log
> The file with name "samba.%T.log" gets created in /var/log/samba folder
> and %T will not get substituted with current date & time.
Yes, currently the 'samba' side of things (compared with smbd) doesn't
know how to substitute the macros. Now part of this is due to global
variables and multiple clients per connection, but it doesn't really
excuse us also skipping things like %T.
> I request for your guidance to correct this part. Also the samba
> continues to write into .old file as well and not finding any means to
> correct it.
I think this is because each process only checks if the file should be
rotated every few lines, so they can hold the log open for quite some
time. Ideally a global signal would be sent saying which file (or even
just that a file) just got rotated, so everyone can re-open.
Patches are most welcome!
Andrew Bartlett http://samba.org/~abartlet/
Authentication Developer, Samba Team http://samba.org
Samba Developer, Catalyst IT http://catalyst.net.nz/services/samba
To unsubscribe from this list go to the following URL and read the