signalwire / freeswitch

FreeSWITCH is a Software Defined Telecom Stack enabling the digital transformation from proprietary telecom switches to a versatile software implementation that runs on any commodity hardware. From a Raspberry PI to a multi-core server, FreeSWITCH can unlock the telecommunications potential of any device.
https://freeswitch.com/#getting-started
Other
3.54k stars 1.41k forks source link

mod_logfile maximum-rotate does'nt work #2414

Open ilkayorhanlar opened 6 months ago

ilkayorhanlar commented 6 months ago

I set maximum-rotate with 500 in logfile.conf but I did'nt see 500 files in log path. I see 91 log files. My expectation is that I can see 500 log file in log path. But I guess that freeswitch removes log files.

Notes: I restart freeswitch each early morning. I run this command with cron for each 6 hours to rotate logs (systemctl kill -s HUP freeswitch)

FreeSWITCH Version 1.10.9-release.15~64bit (-release.15 64bit) CentOS Linux release 7.9.2009 (Core)

ilkayorhanlar commented 6 months ago

I guess, in mod_logfile.c file and in "load_profile" method" method suffix variable is equaled to 1. I guess after freeswitch restart, be called "load_profile" method in "mod_logfile.c"

But my opinion; If suffix of my oldest log file is 90, suffix variable should be 90.

In this way, the rotation logic doesnt effect restart operation.

If you agree with me, I can open pull request.

omercurgul commented 5 months ago

I know this problem. I have been living too for a long time. It would be nice if there is a solution and it is fixed.

Can you help with the solution?

ilkayorhanlar commented 5 months ago

PR https://github.com/signalwire/freeswitch/pull/2440

omercurgul commented 5 months ago

Thanks. I hope they merge it into the main repo quickly.

ilkayorhanlar commented 4 months ago

Hi,

Is there any progress? Can you review and merge my PR. This is important for me.

mirzaKarahan commented 4 months ago

Hi,

We have been having this problem for a long time. I'm waiting for the solution to merge with the main repo.