** FULLY COMPATIBLE WITH MULTISITE INSTALLATIONS **
** The plugin is recommended to use only in development. **
This plugin provides an easy way to view any *.log files directly in admin panel. Also you can perform simple actions like empty the file or deleting it.
To activate WordPress logging to file you have to set
define( 'WP_DEBUG_LOG', true ); in your wp-config.php file.
In Multisite installations you have to be Super Admin for using this plugin.
Additionally in Singlesite installations you have to have the ‘edit_plugins’ capability which is by default only granted to admins.
There is an first integration for a panel to the Debug Bar Plugin. The integration could be deactivated by setting ENABLE_DEBUGBAR_INTEGRATION to false in log-viewer.php.
If you’re experiencing problems please report through support forum or check FAQ section. If you have suggestions feel free to submit your view.
Log-Viewer is also listed on the excellent Developer Plugin which comes directly by the awesome guys at Automattic!
Known limitations / Bugs:
- Autorefresh is currently fixed at 15 seconds if enabled – will let you choose custom timing soon
- after an action in files view a wp_redirect should be called but there’s already output present so not working. Workaround is to unset all variables.
- User settings stored “manually”; switch to wordpress own *_user_setting functions but currently problems on cookie/header_sent limiting
- User settings stored in wp_options ( thats ok ) but on multisite installations they are stored in each wp_*_options table
- Adding Dashboard functionality ( and/or File View in Dashboard menu (WP_NETWORK_ADMIN) )
- Translations ( DE )
- Cleanup on uninstalling
- Message if WP_DEBUG not set ( on activation? )
- Upload to your plugins folder, usually found at ‘wp-content/plugins/’
- Activate the plugin on the plugins screen
- You may want to activate WP logging setting WP_DEBUG_LOG to TRUE in your wp-config.php file
- Navigate to Tools > Log Viewer to show and view log files
- I am admin! Why can’t i see the Tools > Log Viewer menu entry?
If your on a Multisite installation you have to be a Super Admin.
If your on a Singlesite installation you additionally have to have the ‘edit_plugins’ role.
- But i am a Super Admin with super powers and still can’t see the Tools > Log Viewer menu entry!
Pow! Slam! Donk! … as stated you have to have ‘edit_plugins’ role. There are WordPress constants like ‘DISALLOW_FILE_EDIT’ which deactivates this even for the greatest of the admins.
Have a look at https://codex.wordpress.org/Roles_and_Capabilities or do a websearch for ‘wordpress.org DISALLOW_FILE_EDIT’ and have a talk to your site maintainer.
- How to enable debug.log
define( 'WP_DEBUG_LOG', true );in your wp-config.php file. This is not recommended on production environments!
- I changed my error_log to something other than WP default
That’s ok … as long as the file extension is .log and it’s located in WP_CONTENT_DIR. Other sources or extensions aren’t supported for now.
- Can i show other files?
Yes you can! As long as they are located in WP_CONTENT_DIR and have a .log extension. Other sources or extensions aren’t supported for now.
- In Files View i only get the error message “Could not load file.” or “No files found.”
It looks like there isn’t a *.log file in WP_CONTENT_DIR. Which could mean there are no errors. Yay!
If there are files, it could be that they are not readable ( check your permissions ) or it’s a bug … Booo!
- I don’t see File Actions options
The options are only displayed if the file is writeable. Check your permissions.
Works great, really nice tool to use.
Contributors & Developers
“Log Viewer” is open source software. The following people have contributed to this plugin.Contributors
- Fixed : error calling method static
- Added first Debug Bar integration
- nothing changed ( tag for Debug-Bar functionality )
- rewrite branch merged to trunk
- full Multisite support ( currently only super admin! )
- rewrite based on the great WordPress-Plugin-Boilerplate of Tom McFarlin
- optimizations for Multisite installations
- securing Singlesite installations
- moved to PhpStorm for development
- changed build script to Phing
- started complete rewrite for MU optimizations
- changed version string for better readability
- added Display Options above file list
- added Autorefresh Option ( currently fixed at every 15 seconds )
- added FIFO / FILO Option ( FIFO = displays file as is; FILO = displays file reversed )
- moved from sublime text to netbeans for development
- modified structure for standard compliance ( Support Topic by nickdaugherty )
- added more files ( currently only WP_CONTENT_DIR and *.log )
- added file info
- started revamp of class structure
- check if file is writeable; if not cancel actions / display message
- adjusting wp-plugin contents
- initial WordPress.org Plugins commit
- restructured for svn and wp-plugins hosting
- solved problems with wp-plugins site
- submit for WordPress.org approvement