[asterisk-dev] CDR: log? lib?

Matthew Jordan mjordan at digium.com
Thu Jan 8 11:59:42 CST 2015


Hey Tzafrir -

Sorry I didn't reply sooner. Response inline below.

On Wed, Dec 31, 2014 at 3:10 AM, Tzafrir Cohen <tzafrir.cohen at xorcom.com> wrote:
> Following a bug report asking to rotate Master.csv in the asterisk
> package:
>
>   https://bugs.debian.org/761985
>
> Someone noted there that while those files are lined-based and
> comulative the same as log files, they should not be rotated by
> logrotate. Or at least not by default: they're databases.

I would think that this is not a bug, for a few reasons:

(1) The data in them is as Andriy Ivashchenko mentioned - they are
closer to 'databases' than 'logs'. The CSV format just happens to be
one way in which they are formatted. I'd put it this way: would you
ever want your CDRs to be sent to syslog? (I suspect not)

(2) CDRs are completely optional. You may have an Asterisk system with
no CDRs, CELs, etc. On the other hand, you are almost certainly always
going to have logs - even if only the ERRORs. They feel like mutually
exclusive concepts.

> I also wonder if they're useful enough to be generated by default (that
> is: if you can't be bothered to think about rotating them, don't
> generate them).
>
> The same applies to cdr_sqlite, of course. Any thoughts?
>

If someone wanted a script that rotated specific CDRs, I'd say that's
an acceptable contribution in the contrib/scripts folder. But I
wouldn't combine that with logrotate, and I'd move that it would be an
enhancement, and not a bug fix.


-- 
Matthew Jordan
Digium, Inc. | Engineering Manager
445 Jan Davis Drive NW - Huntsville, AL 35806 - USA
Check us out at: http://digium.com & http://asterisk.org



More information about the asterisk-dev mailing list