diff --git a/includes/utilities.php b/includes/utilities.php index 464e29f..14d0a88 100644 --- a/includes/utilities.php +++ b/includes/utilities.php @@ -31,8 +31,14 @@ public static function log( $message = '' ){ public static function read_log( $total_lines = 500 ){ // https://stackoverflow.com/a/2961685/306961 + $log_path = GIW_PATH . 'logs/log.log'; + + if( !file_exists( $log_path ) ){ + return array('Nothing logged yet !'); + } + $lines = array(); - $fp = fopen( GIW_PATH . 'logs/log.log', 'r' ); + $fp = fopen( $log_path, 'r' ); while( !feof( $fp ) ){ $line = fgets( $fp, 4096 ); diff --git a/readme.txt b/readme.txt index 53ea8fa..1bc2f1e 100644 --- a/readme.txt +++ b/readme.txt @@ -89,7 +89,8 @@ It is recommended that a permalink structure is enabled in the WordPress site so * [FAQ](https://www.aakashweb.com/docs/git-it-write/) * [Support forum/Report bugs](https://www.aakashweb.com/forum/) - +* [Donate](https://www.paypal.me/vaakash/) +* [Contribute on Github](https://github.com/vaakash/git-it-write) ## Installation