New

Just launched: Vueblocks, a brand-new search engine for Vue packages! Explore Vueblocks →

gundars/hoglog

HogLog is a log viewer API for your remote Laravel/Lumen installation
1,090 1
Install
composer require gundars/hoglog
Latest Version:0.3.0
PHP:>=5.3.2
License:MIT
Last Updated:Nov 20, 2015
Links: GitHub  ·  Packagist
Maintainer: gundars


    ,--.   ,--.     ____  ____   ___      ______  _____       ___      ______
    \  /-~-\  /    |_   ||   _|.'   `.  .' ___  ||_   _|    .'   `.  .' ___  |
     )' a a `(       | |__| | /  .-.  \/ .'   \_|  | |     /  .-.  \/ .'   \_|
    (  ,---.  )      |  __  | | |   | || |   ____  | |   _ | |   | || |   ____
     `(_o_o_)'      _| |  | |_\  `-'  /\ `.___]  |_| |__/ |\  `-'  /\ `.___]  |
       )`-'(       |____||____|`.___.'  `._____.'|________| `.___.'  `._____.'



HogLog is log file viewer API for your remote Laravel/Lumen installation

###Installation

Add a dependency to your composer, execute

composer require gundars/hoglog ~0.3.*

Add the following lines to your /bootstrap/app.php:

config(
    [
        'hoglog' => [
            'rootPrefix' => 'configuration/hoglog/',
            'logdir'     => storage_path() . '/logs'
        ]
    ]
);
$app->register('HogLog\HogLogServiceProvider');

###Plan B If your installation is not booting, but you need laravel-less log reader, use the /extra/PlanB class

Format: class::getInstance()->view(string $jailDir[, array $whitelistFilenames])

Hitting the URL of the file it is included in with browse parameter will either print the file contents, or list of items in case of a directory.

####Samples:

#####Allow reading all files in logs directory Code:

\HogLog\PlanB::getInstance()->view('../storage/logs/');

URLs:

#reads dir
example.com/file-calling-planb.php/?browse=../storage/logs/
#reads file
example.com/file-calling-planb.php/?browse=../storage/logs/lumen.log

#####Allow reading all files in storage directory with .txt extension Code:

\HogLog\PlanB::getInstance()->view('../storage/', ['.txt']);

URL:

example.com/file-calling-planb.php/?browse=../storage/file.txt

#####Allow reading only single file lumen.log Code:

\HogLog\PlanB::getInstance()->view('../storage/logs/', ['lumen.log']);

URL:

example.com/file-calling-planb.php/?browse=../storage/file.txt

Related Packages

sergiq/laravellog

Simple laravel log

11,943 0
coolonce/logger-interface

This package allows you to send data for logging to the HTTP daemon associated w...

4,640 1
imer/laravel-query-table

Laravel plugin for displaying query results as a table with built-in filtering/s...

2,086 0
wiidoo/file-manager

File Manager uploaded to laravel

48 2

Version History

Version Released PHP License
0.3.0 >=5.3.2 MIT
0.2 >=5.3.2 MIT
v0.1 >=5.3.2 MIT