Topics

MMDVM_Bridge and Analog_Bridge log file name and timezone changes possible?

David Ranch
 


Hello Everyone,

I would like to use Linux's logrotate tool to rotate out and compress the various DV Switch but the MMDVM system names it's log files differently from everything else:

   MMDVM_Bridge-2019-08-24.log  <--- uses a date scheme and auto-rotates
   MMDVM_Bridge-2019-08-23.log
   MMDVM_Bridge-2019-08-22.log
   MMDVM_Bridge-2019-08-21.log
   MMDVM_Bridge-2019-08-20.log
   MMDVM_Bridge-2019-08-19.log
   MMDVM_Bridge-2019-08-18.log
   MMDVM_Bridge-2019-08-17.log

   Analog_Bridge.log <--- Uses one standard log name and never rotates

   asterisk/messages <--- Uses one standard log name and never rotates


I'm trying to figure out how I can get MMDVM to just create names like "MMDVM_Bridge" and not auto-rotate them.  Is that possible?   I would also like the MMDVM and Analog_Bridge logs to use localtime just like how the Asterisk/messages timestamps work.   I've looked at various documentation for these items including:

   https://github.com/N4IRS/MMDVM-Install

   https://docs.google.com/document/d/1-Ot5pGaibmEGmmFh-l8HUq2LRyZoujiJYulr-VSga9s/edit

but I'm striking out.  Can anyone tell me if these changes are possible w/o recompiling the code?

--David
KI6ZHD

Steve N4IRS
 

David,
Here is a log rotate for Asterisk:

/var/log/asterisk/messages /var/log/asterisk/*log {
   daily
   missingok
   rotate 14
   compress
   delaycompress
   notifempty
   sharedscripts
   postrotate
        /usr/sbin/asterisk -rx 'logger reload' > /dev/null 2>&1
   endscript
}

Analog_Bridge will allow you to logrotate. I'm pretty sure it will start a new log, so you will not need the postrotate.
Mike and I will talk about MMDVM_Bridge.

73, Steve N4IRS

On 8/24/19 4:51 PM, David Ranch wrote:

Hello Everyone,

I would like to use Linux's logrotate tool to rotate out and compress the various DV Switch but the MMDVM system names it's log files differently from everything else:

   MMDVM_Bridge-2019-08-24.log  <--- uses a date scheme and auto-rotates
   MMDVM_Bridge-2019-08-23.log
   MMDVM_Bridge-2019-08-22.log
   MMDVM_Bridge-2019-08-21.log
   MMDVM_Bridge-2019-08-20.log
   MMDVM_Bridge-2019-08-19.log
   MMDVM_Bridge-2019-08-18.log
   MMDVM_Bridge-2019-08-17.log

   Analog_Bridge.log <--- Uses one standard log name and never rotates

   asterisk/messages <--- Uses one standard log name and never rotates


I'm trying to figure out how I can get MMDVM to just create names like "MMDVM_Bridge" and not auto-rotate them.  Is that possible?   I would also like the MMDVM and Analog_Bridge logs to use localtime just like how the Asterisk/messages timestamps work.   I've looked at various documentation for these items including:

   https://github.com/N4IRS/MMDVM-Install

   https://docs.google.com/document/d/1-Ot5pGaibmEGmmFh-l8HUq2LRyZoujiJYulr-VSga9s/edit

but I'm striking out.  Can anyone tell me if these changes are possible w/o recompiling the code?

--David
KI6ZHD

David Ranch
 


Hey Steve,

Thanks for the logrotate formula though I already put something similar in place.



Analog_Bridge will allow you to logrotate. I'm pretty sure it will start a new log, so you will not need the postrotate.

Ok, Is there any harm in leaving in the postrotate?


Mike and I will talk about MMDVM_Bridge.

Ok.. thanks!  Please don't forget to discuss the timezone thing too!

--David
KI6ZHD



Hello Everyone,

I would like to use Linux's logrotate tool to rotate out and compress the various DV Switch but the MMDVM system names it's log files differently from everything else:

   MMDVM_Bridge-2019-08-24.log  <--- uses a date scheme and auto-rotates
   MMDVM_Bridge-2019-08-23.log
   MMDVM_Bridge-2019-08-22.log
   MMDVM_Bridge-2019-08-21.log
   MMDVM_Bridge-2019-08-20.log
   MMDVM_Bridge-2019-08-19.log
   MMDVM_Bridge-2019-08-18.log
   MMDVM_Bridge-2019-08-17.log

   Analog_Bridge.log <--- Uses one standard log name and never rotates

   asterisk/messages <--- Uses one standard log name and never rotates


I'm trying to figure out how I can get MMDVM to just create names like "MMDVM_Bridge" and not auto-rotate them.  Is that possible?   I would also like the MMDVM and Analog_Bridge logs to use localtime just like how the Asterisk/messages timestamps work.   I've looked at various documentation for these items including:

   https://github.com/N4IRS/MMDVM-Install

   https://docs.google.com/document/d/1-Ot5pGaibmEGmmFh-l8HUq2LRyZoujiJYulr-VSga9s/edit

but I'm striking out.  Can anyone tell me if these changes are possible w/o recompiling the code?

--David
KI6ZHD

Steve N4IRS
 

Well,
It make no sense to me to restart asterisk when rotating the AB log. AB does not need a restart, so why bother?
postrotate
        /usr/sbin/asterisk -rx 'logger reload' > /dev/null 2>&1

This says after the rotate (postrotate) reload the asterisk logger. You could restart AB, but again why bother.

On 8/24/19 5:40 PM, David Ranch wrote:

Hey Steve,

Thanks for the logrotate formula though I already put something similar in place.



Analog_Bridge will allow you to logrotate. I'm pretty sure it will start a new log, so you will not need the postrotate.

Ok, Is there any harm in leaving in the postrotate?


Mike and I will talk about MMDVM_Bridge.

Ok.. thanks!  Please don't forget to discuss the timezone thing too!

--David
KI6ZHD



Hello Everyone,

I would like to use Linux's logrotate tool to rotate out and compress the various DV Switch but the MMDVM system names it's log files differently from everything else:

   MMDVM_Bridge-2019-08-24.log  <--- uses a date scheme and auto-rotates
   MMDVM_Bridge-2019-08-23.log
   MMDVM_Bridge-2019-08-22.log
   MMDVM_Bridge-2019-08-21.log
   MMDVM_Bridge-2019-08-20.log
   MMDVM_Bridge-2019-08-19.log
   MMDVM_Bridge-2019-08-18.log
   MMDVM_Bridge-2019-08-17.log

   Analog_Bridge.log <--- Uses one standard log name and never rotates

   asterisk/messages <--- Uses one standard log name and never rotates


I'm trying to figure out how I can get MMDVM to just create names like "MMDVM_Bridge" and not auto-rotate them.  Is that possible?   I would also like the MMDVM and Analog_Bridge logs to use localtime just like how the Asterisk/messages timestamps work.   I've looked at various documentation for these items including:

   https://github.com/N4IRS/MMDVM-Install

   https://docs.google.com/document/d/1-Ot5pGaibmEGmmFh-l8HUq2LRyZoujiJYulr-VSga9s/edit

but I'm striking out.  Can anyone tell me if these changes are possible w/o recompiling the code?

--David
KI6ZHD