Giter VIP home page Giter VIP logo

Comments (7)

arcanedev-maroc avatar arcanedev-maroc commented on May 31, 2024

@lorvent Of course you can, this package is actually an API, i made routes, controller and views for demostration/test/dev.

To disable the package's views, controller, routes ...

// config/log-viewer.php
<?php

return [
    // other stuff
    /* ------------------------------------------------------------------------------------------------
     |  Route
     | ------------------------------------------------------------------------------------------------
     */
    'route'         => [
        'enabled'    => false,   // Set this to false to diable routes => controller => views

        'attributes' => [
            'prefix'     => 'log-viewer',

            'middleware' => null,
        ],
    ],
    // other stuff
];

Then can create your own routes, controllers and views.

And for the best part, use the API by using the Facade LogViewer already registered by the service provider or the helper log_viewer().

For the API documentation (WIP), you can visit the wiki page for usage examples (https://github.com/ARCANEDEV/LogViewer/wiki/4.-Usage).

There is no models (no database), only entities (Classes/Objects).

You can retrieve them and do you own calculation/transformation.

Note : Take a look at the entities source code (https://github.com/ARCANEDEV/LogViewer/tree/master/src/Entities)

from logviewer.

lorvent avatar lorvent commented on May 31, 2024

WOW,
I assumed, setting route enabled to false disables only route but you did great job

on a side note, i have an existing site for many months and my log size is very big
but when i try to access, its showing just empty dashboard and empty logs list.

what could be the reason?

from logviewer.

arcanedev-maroc avatar arcanedev-maroc commented on May 31, 2024

Do you have only one log file ??

Check your config\app.php :

    /* ---------------------------------------------------------------------
     |  Logging Configuration
     | ---------------------------------------------------------------------
     | Available Settings: "single", "daily", "syslog", "errorlog"
     */
    'log' => 'daily',

The LogViewer support only the daily log system (at this moment) because it's the best way to manage you logs (Smaller size files, delete unnecessary/old logs and more).

If you keep to log into one file, you are going to have a file bigger than 2Go after a year or 2 :).

The solution is to split your log laravel.log into seperate logs:

laravel-YYYY-MM-DD.log
laravel-2015-01-01.log
laravel-2015-01-02.log
laravel-2015-01-03.log
laravel-2015-01-04.log
laravel-2015-01-05.log

from logviewer.

lorvent avatar lorvent commented on May 31, 2024

Huh... you are correct
i have only single log file but i should blame laravel for it :p
default configuration is single and i didn't touch it yet,

now i changed it to daily and wrote some logs.... its showing chart, data beautifully now :)

any chance of allowing single log in future? (just a backward compatibility)

from logviewer.

arcanedev-maroc avatar arcanedev-maroc commented on May 31, 2024

I don't know, it may cause some performance issues, risky (if you delete you log file, you lose all your data), do.....wn......loa..d...v..e..r...y..sl...o....................and you lose your internet connection at 99%

I'm not sure if it's a good idea.

from logviewer.

lorvent avatar lorvent commented on May 31, 2024

hahaha makes sense

but how about showing a warning to user if they have single type and guiding them how to make it daily type ?

from logviewer.

arcanedev-maroc avatar arcanedev-maroc commented on May 31, 2024

I'm working on it, i've a lot of ideas for this package. Stay tuned 👍

from logviewer.

Related Issues (20)

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.