Fork me on GitHub


Before to start logging, please make sure that system setup completed and working correctly!

Do not fotget to include Log to your library to your code:
use Log;

A sample usage in a controller:
    namespace App\Http\Controllers;  

    use Log;   
    class ReportController extends Controller
        public function getDailyStat()
            Log::info('log', ['message' = 'Report service called', method='getDailyStat']);
            return view('report/daily-stat');


This is hearth of Glog. Therefore please, double notice this part of documantation. Here is the sample config file coming with default settings.


return [

    // No need to change it now, thats for future releases!

    'service'  =>  env('GLOG_SERVICE', 'local'),

    // Secure your log panel

'middlewares'  => ['web', 'App\Http\Middleware\LogAccess'],


// glog uses mysql default, but can be choose mongodb

'db_connection'  =>  env('DB_CONNECTION', 'mysql'),


// To create an alert, enter level and channel pair here

// Example: 'notification' => ['test-channel' => ['CRITICAL', 'ALERT']],

'notification'  => [],

'mail_subject'  =>  'Glog notification mail',

'mail_to'  =>  env('MAIL_FROM'),

'translations'  => [

'test-channe'  =>  'A sample channel'



// Panel route path

'route-prefix'  =>  'logs-panel',


// All channels must be entered before to send the API.


'channels'  => ['test-channel', 'user.register'],


If you can not find this file (glog.php) under config folder, this means that you've failed to publish vendor. Please, check the installation steps again.

Service config: Local or Api

Current release, works on local. So default choice is local. Ne need to change it. But in next days, we will publish an api gateaway to log remote. So leave it as comes default.

Log Levels

Same as laravel do, the logger provides the eight logging levels defined in RFC 5424: emergency, alert, critical, error, warning, notice, info and debug. If you do not log any level, remove it from levels array.


These are the hooks which our log handler will take care of them with levels. If you log with a level and settings channel as a message in log instance, system will handle it.

Some examples:

    Log::info('blog-post', ['message' => 'Blog post has been seen!']);
    Log::debug('blog-post', ['message' => 'Post has been viewd']);


If you log using a channel with described level in notification array, it triggers mailing system. An example will cover it better:

Example with notification:


In this example, our target channel is and it's also in our notification array. In notification array, has two log levels: ['CRITICAL', 'ALERT'] So if we loog with critiacal or alert level, dblogger will send an alert mail with exception message, remote ip address.

Another example without notification:


In this example, our target channel is and it's also in our notification array. But target level is debug which is not in our notification level. So system will not mail anything.

Mail Settings
You may update your email subject and target email. But also you may exchange channels name to a custom messages. instead of 'A new user registered' will be a better message in email. Also if you use GUI within the same setup (or you can copy it to Gui setup), Gui will show pretty messages instead of short name.

Web-Based Panel
Default Loga Panel can be accessible at http://your-site/logs-panel. However you may change this URL from glog config page.