Adding date to the server Log

Discussion in '3CX Phone System - General' started by q, Jul 17, 2007.

  1. q

    q

    Joined:
    Jul 17, 2007
    Messages:
    3
    Likes Received:
    0
    Is there a configuration switch to add the date to the time field on the server log page?
     
  2. 5qg4

    5qg4 Active Member

    Joined:
    Jan 31, 2007
    Messages:
    643
    Likes Received:
    0
    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
     
  3. q

    q

    Joined:
    Jul 17, 2007
    Messages:
    3
    Likes Received:
    0
    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
     
  4. 5qg4

    5qg4 Active Member

    Joined:
    Jan 31, 2007
    Messages:
    643
    Likes Received:
    0
    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"
     
  5. archie

    archie Well-Known Member
    3CX Staff

    Joined:
    Aug 18, 2006
    Messages:
    1,309
    Likes Received:
    0
    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 :)
     
  6. q

    q

    Joined:
    Jul 17, 2007
    Messages:
    3
    Likes Received:
    0
    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!
     

Share This Page