Giter Site home page Giter Site logo

think-log-viewer's Introduction

ThinkLogViewer

基于 Thinkphp5 开发的日志浏览组件。该组件为我们提供了一键浏览当前项目日志的功能。

安装

composer require qsnh/think-log-viewer

使用

在命令行输入:

php think run

之后打开浏览器,输入:

http://127.0.0.1:8000/log

可以看到:

_ _20180407152242

_ _20180407152301

配置

该扩展包默认注册了 /logs 路由,对应的控制器是 Qsnh\Think\Log\Controllers\LogViewerController@index 如果您因为权限原因或者路由路径问题等原因的话,请自己在 /route/route.php 文件中覆盖该路径。具体可以这样:

Route::get('/logs', function () {});
Route::get('/backend/logs', 'Qsnh\Think\Log\Controllers\LogViewerController@index');

请注意控制好权限! 上面代码并不推荐在生产环境下使用,因为闭包无法进行路由缓存。

Author

Qsnh

think-log-viewer's People

Contributors

qsnh avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.