Page 1 of 10 123 ... LastLast
Results 1 to 10 of 95
  1. #1
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    12,399
    Plugin Contributions
    87

    Default Display Log Files [Support Thread] (v1.5.1-to-v1.5.6)

    There have been many times that I've taken a look in one of my Zen Cart's /logs (or /cache for Zen Cart v1.5.0) directories and found some debug log files that I wasn't previously aware of. This plugin allows an admin user to view (and selectively delete) any files with names that match:

    myDEBUG-*.log
    AIM_Debug_*.log
    SIM_Debug_*.log
    FirstData_Debug_*.log
    Linkpoint_Debug_*.log
    Paypal*.log
    paypal*.log
    ipn_*.log
    zcInstall*.log
    notify*.log

    The plugin searches only in these directories for the matching log-files:

    /cache
    /logs
    /includes/modules/payment/paypal/logs

    Once installed, the plugin can be accessed by a signed-in and authorized admin user by selecting Tools->Display Log Files.

    Note: Due to the potentially sensitive nature of the information contained in some of the log files, I suggest that you run your admin in SSL mode if you use this plugin.

    Due the the number of files that can accumulate, only the most recent 20 are displayed by default. If you want to display more files at a time, edit the file /YOUR_ADMIN/display_logs.php and change line 23:

    define('MAX_LOG_FILES_TO_VIEW', 20);

    The tool allows the logged-in (and authorized) admin user to:

    Sort the log files, either ascendingly or descendingly, by last-modified/creation date.
    Select (via checkbox) and then delete only the log files selected.
    Delete all log files currently being viewed.
    View the contents of an individual log file.

    It's been tested on Zen Cart v1.5.0 and v1.5.1 and will be submitted to the Plugins area for review today.

  2. #2
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    12,399
    Plugin Contributions
    87

    Default Re: Display Log Files [Support Thread]

    When approved, the plugin will be available here: http://www.zen-cart.com/downloads.php?do=file&id=1583

  3. #3
    Join Date
    Feb 2012
    Location
    Ohio, USA
    Posts
    58
    Plugin Contributions
    0

    Default Re: Display Log Files [Support Thread]

    This will be a nice addition. Thank you :)

  4. #4
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    12,399
    Plugin Contributions
    87

    Default Re: Display Log Files [Support Thread]

    It's now available in the plugins ... holy crow, that was fast!

  5. #5
    Join Date
    Sep 2010
    Posts
    448
    Plugin Contributions
    0

    Default Re: Display Log Files [Support Thread]

    Will it work for 1.3.9h

  6. #6
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    12,399
    Plugin Contributions
    87

    Default Re: Display Log Files [Support Thread]

    Quote Originally Posted by Rizla View Post
    Will it work for 1.3.9h
    Sorry, it currently works on v1.5.0 and v1.5.1 only.

  7. #7
    Join Date
    Aug 2007
    Location
    Gijón, Asturias, Spain
    Posts
    2,571
    Plugin Contributions
    30

    Default Re: Display Log Files [Support Thread]

    Now that's doing it properly! Where do you find the time!

    I also had a desire to know about debug logs when I caused them, so I made up something very basic to just push the logs in my face above the header...which may suit some people:
    http://www.zen-cart.com/showthread.p...-Automatically
    Steve
    github.com/torvista: Spanish Language Pack, Google reCaptcha, Structured Data, Multiple Copy-Move-Delete, Image Checker, BackupMySQL Admin/Auto...

  8. #8
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    12,399
    Plugin Contributions
    87

    Default Re: Display Log Files [Support Thread]

    Thanks for the compliment, Steve. I guess I just got tired of FTPing debug log files, so it's actually going to be a time-saver for me!

  9. #9
    Join Date
    Feb 2012
    Location
    Ohio, USA
    Posts
    58
    Plugin Contributions
    0

    Default Re: Display Log Files [Support Thread]

    Ok. I renamed my admin and uploaded the files. Getting a 500 server error. I do have a logs and cache directory, but I'm getting this error in my debugs:

    PHP Warning: dir(DIR_FS_LOGS) [<a href='function.dir'>function.dir</a>]: failed to open dir: No such file or directory in /home/xxxxxx/ohwowthatscool.com/myadmin/display_logs.php on line 41
    [23-Dec-2012 08:34:23] PHP Fatal error: Call to a member function read() on a non-object in /home/xxxxxx/ohwowthatscool.com/myadmin/display_logs.php on line 42

    Any idea what the problem might be? The error reads like it is looking for function.dir.

    (Running this on 1.5.1) White screen of death when I choose Display Logs from the admin menu, then it generates the debug in my cache folder.

    Thanks.

  10. #10
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    12,399
    Plugin Contributions
    87

    Default Re: Display Log Files [Support Thread]

    Quote Originally Posted by jlizotte View Post
    Ok. I renamed my admin and uploaded the files. Getting a 500 server error. I do have a logs and cache directory, but I'm getting this error in my debugs:

    PHP Warning: dir(DIR_FS_LOGS) [<a href='function.dir'>function.dir</a>]: failed to open dir: No such file or directory in /home/xxxxxx/ohwowthatscool.com/myadmin/display_logs.php on line 41
    [23-Dec-2012 08:34:23] PHP Fatal error: Call to a member function read() on a non-object in /home/xxxxxx/ohwowthatscool.com/myadmin/display_logs.php on line 42

    Any idea what the problem might be? The error reads like it is looking for function.dir.

    (Running this on 1.5.1) White screen of death when I choose Display Logs from the admin menu, then it generates the debug in my cache folder.

    Thanks.
    The error message indicates that the constant DIR_FS_LOGS is not defined so that the PHP dir function is choking. Running on v1.5.1, you should have the DIR_FS_LOGS constant defined in both /YOUR_ADMIN/includes/configure.php and /includes/configure.php. I'm guessing that this was an upgrade to v1.5.1 for your site.

    That said, the plugin shouldn't be giving you the white-screen-of-death. I don't seem to have an issue with or without the DIR_FS_LOGS constant on v1.5.1 because the Zen Cart init handlers 'fix' it. It's another story on v1.5.0, however, where I'm seeing what you're seeing.

    Make the changes highlighted in red to /YOUR_ADMIN/display_logs.php, starting at line 39:
    Code:
         foreach(array(DIR_FS_LOGS, DIR_FS_SQL_CACHE, DIR_FS_CATALOG . '/includes/modules/payment/paypal/logs') as $logFolder) {
          $logFolder = rtrim($logFolder, '/'); 
          $dir = @dir($logFolder);
          if ($dir != NULL) {
            while ($file = $dir->read()) {
              if ( ($file != '.') && ($file != '..') && substr($file, 0, 1) != '.') {
                if (preg_match('/^(myDEBUG-|AIM_Debug_|SIM_Debug_|FirstData_Debug_|Linkpoint_Debug_|Paypal|paypal|ipn_|zcInstall).*\.log$/', $file)) {
                  $hash = sha1 ($logFolder . '/' . $file);
                  $logFiles[$hash] = array ( 'name'  => $logFolder . '/' . $file,
                                             'mtime' => filemtime($logFolder . '/' . $file)
                                           );
                }
              }
            }
          }
    I'll hold off on resubmission to the Plugins for a bit, just in case ...

 

 
Page 1 of 10 123 ... LastLast

Similar Threads

  1. v151 Log Manager [Support Thread]
    By lat9 in forum All Other Contributions/Addons
    Replies: 9
    Last Post: 19 Oct 2023, 11:44 AM
  2. v155 Big Files support thread
    By swguy in forum Addon Admin Tools
    Replies: 6
    Last Post: 9 Nov 2021, 07:06 AM
  3. v156 PWA, Offline support Push notifications addon [Support Thread]
    By perfumbg in forum All Other Contributions/Addons
    Replies: 0
    Last Post: 23 May 2019, 02:27 PM
  4. v155 WordPress Product Display Support Thread
    By swguy in forum All Other Contributions/Addons
    Replies: 0
    Last Post: 13 Jul 2017, 12:04 AM
  5. v150 Admin Password Change Alert Message Display -- Support Thread
    By lat9 in forum All Other Contributions/Addons
    Replies: 13
    Last Post: 24 Dec 2015, 04:53 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR