mrjuliuss/syntara-logviewer

This package is abandoned and no longer maintained. No replacement package was suggested.

Logviewer for Syntara admin package

1.1 2013-12-23 10:25 UTC

This package is auto-updated.

Last update: 2022-04-12 14:11:21 UTC


README


A Logviewer for [Syntara package](https://github.com/MrJuliuss/syntara), using [Mikemand logviewer package](https://github.com/mikemand/logviewer)

68747470733a2f2f7261772e6769746875622e636f6d2f4d724a756c697573732f73796e746172612d6c6f677669657765722f6d61737465722f73637265656e73686f74732f6c6f677669657765722e706e67

Features

  • Views and delete Laravel4 logs

Requirements

  • PHP 5.3+

Dependencies

Installation

In the require key of composer.json file add the following line

If your application uses Laravel 4.0 :

/!\ This branch is no longer maintained

"mrjuliuss/syntara-logviewer": "1.0.*"

If your application uses Laravel 4.1 :

"mrjuliuss/syntara-logviewer": "1.1.*"

Run the Composer update command

$ composer update

In app/config/app.php :

Add 'Kmd\Logviewer\LogviewerServiceProvider' and 'Mrjuliuss\SyntaraLogviewer\SyntaraLogviewerServiceProvider' to the end of the $providers array

'providers' => array(
    'Illuminate\Foundation\Providers\ArtisanServiceProvider',
    'Illuminate\Auth\AuthServiceProvider',
    ...
    'Kmd\Logviewer\LogviewerServiceProvider',
    'Mrjuliuss\SyntaraLogviewer\SyntaraLogviewerServiceProvider'
),

Launch install commands :

php artisan logviewer:install

You can see logs here :

http://your-url/dashboard/logviewer

Custom Development

Add logviewer to the navbar

  • If you already have a template for navigation : -> add to your template

@include('syntara-logviewer::navigation')

  • else :

add to app/filters.php (or app/routes.php)

View::composer('syntara::layouts.dashboard.master', function($view)
{
    $view->nest('navPages', 'syntara-logviewer::navigation');
});

###A note about Laravel 4.1 (mikemand recommandation)

As of right now (2013-11-29), fresh Laravel 4.1 applications log things differently than they used to. While this doesn't technically break LogViewer, LogViewer also doesn't know how to handle these changes. Whether these changes are permanent or not is unclear, but here's a quick fix:

In your app/start/global.php, line 34 change:

Log::useFiles(storage_path().'/logs/laravel.log');

to:

$logFile = 'log-'.php_sapi_name().'.txt';

Log::useDailyFiles(storage_path().'/logs/'.$logFile);

This only applies to new installations of Laravel 4.1. If you've upgraded an existing 4.0 application (and did not make changes to the way logs are created and stored), everything should still work.

Others :

Please see Mikemand logviewer doc.

License

Syntara logviewer is released under the MIT License. See the licence file for details.