Welcome Guest, Not a member yet? Register   Sign In
little helper - Log file viewer
#1

[eluser]Unknown[/eluser]
Yaw folks!

not sure if anyone else ever got annoyed with viewing the logs on the file system - so for development I've helped myself to a little tool that helps me view the debug/log files produced by CodeIgniter's "log_message()" function.

in the attached/linked zip archive is a php file called log.php - place that into CIs /system/logs/ directory and access it directly by a browser.

eventually you might have to edit your .htaccess file to allow access to it.

The script is a stand-alone script and will only allow you access to "log-YYYY-MM-DD.php" files and allows you to filter by keyword, truncate or delete the file.

its surely far from perfect but for what its made it works

Enjoy.
#2

[eluser]serdarakarca[/eluser]
Thank you! It is very helpful.

I was trying to do it on command line.
#3

[eluser]John_Betong[/eluser]
 
When developing I have my logfile set so:

1. it only displays errors
2. the logfile is open in my editor
3. when an error occurs the editor says the file has changed and do I want to upload the changed file.
3. after I have cleared the error I delete and save the cleared log file.
 
./config/config.php
Code:
...
   ...
   ...
   define('LOCALHOST', 'localhost' === $_SERVER['SERVER_NAME']);

   error_reporting(E_ALL | E_STRICT);

   ini_set('display_errors',  LOCALHOST ? 'On', 'Off')

   $config['log_threshold'] = LOCALHOST ? 1 : 0;

   ...
   ...
   ...
 
 
 




Theme © iAndrew 2016 - Forum software by © MyBB