Adding date to the server Log

  • Thread starter Thread starter q
  • Start date Start date
Status
Not open for further replies.

q

Joined
Jul 17, 2007
Messages
3
Reaction score
0
Is there a configuration switch to add the date to the time field on the server log page?
 
You can found the logs files at (by default)

Current day
C:\Program Files\3CX PhoneSystem\Data\Logs\

Logs backup path (Should be keep 7 days)
C:\Program Files\3CX PhoneSystem\Data\Logs\Backup
 
Thanks for the reply.

The log only contains the tme in the first field, is there a way to also include the data (date & time) in the first field.

Thanks
 
The current version 3CX Phone System v3.0.2328.0 no option for keep 7 days full log.

Please create a batch file as below and daily run by scheduler. During restart the services all the calls will be drop without warming.

--------------------------------------------------
net stop "3CX PhoneSystem"
net stop "3CXPhoneSystemWebServer"
net stop 3cxivr
net stop "3CX PhoneSystem Media Server"
net stop 3cxvboxmgr
net stop "3CX PhoneSystem Database Server"

del /q /f "C:\Program Files\3CX PhoneSystem\Data\Logs\*.7"
ren "C:\Program Files\3CX PhoneSystem\Data\Logs\*.6" *.7
ren "C:\Program Files\3CX PhoneSystem\Data\Logs\*.5" *.6
ren "C:\Program Files\3CX PhoneSystem\Data\Logs\*.4" *.5
ren "C:\Program Files\3CX PhoneSystem\Data\Logs\*.3" *.4
ren "C:\Program Files\3CX PhoneSystem\Data\Logs\*.2" *.3
ren "C:\Program Files\3CX PhoneSystem\Data\Logs\*.1" *.2
ren "C:\Program Files\3CX PhoneSystem\Data\Logs\*.log" *.1

net start "3CX PhoneSystem Database Server"
net start 3cxvboxmgr
net start "3CX PhoneSystem Media Server"
net start 3cxivr
net start "3CXPhoneSystemWebServer"
net start "3CX PhoneSystem"
 
If you open 3CXPhoneSystem.ini file and change $ShortDT to $FullDT for the format settings of 3CXPhoneSystem.log file - you will get it. But I doubt it will fit current column size in server status page. And I doubt you can change that size. Anyway - you may try it and decide if it is better or not :)
 
Thanks Archie...it worked great after I made one change to svr_status.php

From:
preg_match_all('/^\d\d:\d\d:\d\d[.]\d\d\d.+$/m', $log_data, $out);
To:
preg_match_all('/^\d\d\d\d[\/]\d\d[\/]\d\d[-]\d\d:\d\d:\d\d[.]\d\d\d.+$/m', $log_data, $out);

I will work allowing it to handle either $ShortDT or $FullDT later and to remove the "-" from the date/time display.

Have a great day!
 
Status
Not open for further replies.

Forum statistics

Threads
111,911
Messages
589,702
Members
164,779
Latest member
affinity123