toanlk/codeigniter_telescope

A simple log viewer for Codeigniter

Installs: 482

Dependents: 0

Suggesters: 0

Security: 0

Stars: 2

Watchers: 0

Forks: 0

Open Issues: 1

Language:HTML

pkg:composer/toanlk/codeigniter_telescope

1.0.8 2025-10-06 12:21 UTC

This package is auto-updated.

Last update: 2025-12-06 12:45:27 UTC


README

Install

Install via composer

composer require toanlk/codeigniter_telescope

Autoload

Edit application/config/config.php:

$config['composer_autoload'] = FALSE;
↓
$config['composer_autoload'] = realpath(APPPATH . '../vendor/autoload.php');

The folder path for log files can be configured by adding clv_log_folder_path to Codeigniter config.php file e.g.

$config['ci_telescope_log_folder_path'] = STORAGE_PATH.'/storage/logs/';

Integration

All that is required is to execute the show() method in a Controller that is mapped to a route:

A typical Controller (Logs.php) will have the following content:

class Logs extends CI_Controller
{
    private $logViewer;

    public function __construct()
	{
        parent::__construct(); 
        $this->load->helper('url');
        $this->logViewer = new \CI_Telescope\CI_Telescope();
    }

	public function index()
	{
        echo $this->logViewer->show();
    }

    // --------------------------------------------------------------------

    public function get_last_logs()
    {
        echo $this->logViewer->get_last_logs();
    }
}
git tag 1.0.1
git push origin 1.0.1
git push --tags