Re: Display Log Files [Support Thread]
Quote:
Originally Posted by
lat9
Exactly! The last update was missing that define. You'll need to edit /YOUR_ADMIN/includes/languages/english/display_logs.php and add the line that I've highlighted in red:
Code:
define('TABLE_HEADING_FILENAME', 'File Name');
define('TABLE_HEADING_MODIFIED', 'Date Modified');
define('TABLE_HEADING_FILESIZE', 'File Size (bytes)'); /*v1.0.3a*/
define('TABLE_HEADING_DELETE', 'Delete?');
define('TABLE_HEADING_ACTION', 'Action');
Thank you very much. I found the file mentioned and inserted the code highlighted in red in Line 27 of that file and it fixed the problem. Many Thanks to you and the rest of the community as well. :clap:
Re: Display Log Files [Support Thread]
I'm about to submit v1.0.3 to the plugins' area:
- Added missing constant to /YOUR_ADMIN/includes/languages/english/display_logs.php.
- Modifications to /YOUR_ADMIN/display_logs.php to account for large files. The notifier_trace.log file, for instance, can grow to be enormous if not flushed periodically.
- BUGFIX: $dir variable close/unset was in the wrong place (/YOUR_ADMIN/display_logs.php).
- BUGFIX: Needed to convert htmlentities in the loaded file to ensure that any present don't disrupt the file display.
1 Attachment(s)
Re: Display Log Files [Support Thread]
I like the convenience of this mod.
But most times I don't check for errors until I know I have one, eg: blank screen
So I have added a warning to the admin that notifies you if any log files exist.
Quick and dirty file attached,
It does need work to extract the language file parts and tidy up, but you will get the idea.
It is a copy of
YOUR_ADMIN\includes\init_includes\init_errors.php
that has a check for log files added.
Place it in the overrides directory
YOUR_ADMIN\includes\init_includes\overrides\init_errors.php
YES you can override some admin files!!
nb: This is for zen v1.5.1
Re: Display Log Files [Support Thread]
Quote:
Originally Posted by
lat9
I'm about to submit v1.0.3 to the plugins' area:
- Added missing constant to /YOUR_ADMIN/includes/languages/english/display_logs.php.
:blush: Sorry for that, I never noticed it was missing. Must have added it somewhere else on my own system.
Re: Display Log Files [Support Thread]
How did I miss this handy little gem!!!??? Thanks lat9 and all for this.. I use a similar plugin for WordPress for debugging/error checking.. I have always wished something similar was available for Zen Cart..
Re: Display Log Files [Support Thread]
Quote:
Originally Posted by
gilby
I like the convenience of this mod.
But most times I don't check for errors until I know I have one, eg: blank screen
So I have added a warning to the admin that notifies you if any log files exist.
Quick and dirty file attached,
It does need work to extract the language file parts and tidy up, but you will get the idea.
It is a copy of
YOUR_ADMIN\includes\init_includes\init_errors.php
that has a check for log files added.
Place it in the overrides directory
YOUR_ADMIN\includes\init_includes\overrides\init_errors.php
YES you can override some admin files!!
nb: This is for zen v1.5.1
Because you've never steered me wrong I just BLINDLY made this change.. :laugh: However, this seems very similar to the code Torvista posted earlier in this thread.. If I am understanding this correctly, Torvista's code displays the error log directly in the message stack, and your code simply notifies the shopowner that an error log exists.. Am I correct???
Re: Display Log Files [Support Thread]
Quote:
Originally Posted by
DivaVocals
However, this seems very similar to the code Torvista posted earlier in this thread.. If I am understanding this correctly, Torvista's code displays the error log directly in the message stack, and your code simply notifies the shopowner that an error log exists.. Am I correct???
Hmmm.. Looks like I have sort of re-invented the wheel :blush:
I should have read the entire thread, seems I was in a hurry.
Mine simply shows how many log files there are as an admin message stack warning.
Torvista's shows the messages there instead. :smile:
I will probably add Torvista's code as well to show the most recent error
Re: Display Log Files [Support Thread]
Quote:
Originally Posted by
gilby
Hmmm.. Looks like I have sort of re-invented the wheel :blush:
I should have read the entire thread, seems I was in a hurry.
Mine simply shows how many log files there are as an admin message stack warning.
Torvista's shows the messages there instead. :smile:
I will probably add Torvista's code as well to show the most recent error
Thanks for confirming.. I like Torvista's code, but given that this add-on shows the error log, I'm gonna keep just your code to inform me when there is an error log to see.. I don't think I need to see it twice..
Re: Display Log Files [Support Thread]
This functionality (showing the existence of debug logs in the admin message stack) is included in 1.6, why not copy it from there and avoid an unnecessary upgrade merge.
Re: Display Log Files [Support Thread]
v1.0.3 is now available in the Plugins ...