Download the PHP package digitaldev-lx/log-hole without Composer

On this page you can find all versions of the php package digitaldev-lx/log-hole. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package log-hole

laravel-eupago-repo-banner

Laravel LogHole

LogHole is a modern, flexible Laravel logging package that supports database drivers. Designed for seamless integration with Laravel's Log facade, it leverages PHP attributes for a clean and powerful logging experience.

Latest version GitHub license


Requirements

Release PHP Laravel
1.0.0 >= 8.2 10

Installation

Install the package via Composer:

You must publish the configuration file:

Configurations

In the configuration file, specify the driver you'd like to use (database). By default, the package supports the database driver.

Example Configuration for Database:

.env file

configuration file logging.php

Use Middleware:

Laravel 10.x

Laravel 10.x uses the web middleware group by default. To log all requests, add the LogHole middleware to the web group in the app/Http/Kernel.php file:

Laravel 11.x

Laravel 11.x also uses the web middleware group by default. To log all requests, add the LogHole middleware to the withMiddleware method in the bootstrap/app.php file:

Using PHP Attributes

LogHole offers PHP attribute-based logging to automatically log actions when specific attributes are applied to methods or classes. To use the Loggable attribute, it is necessary to implement the LogHole middleware.

With the middleware in place, all calls to methods annotated with Loggable will be logged as specified.

Usage

Log messages through Laravel’s Log facade, which will route logs to your chosen storage driver (Redis or database):

View logs

The LogHole dashboard provides a user-friendly interface for viewing logs. You can filter logs by date, level, and message, as well as search for specific log entries.

Laravel Pail

You can use Laravel Pail to view logs in real-time. Laravel Pail is a powerful tool for monitoring logs and debugging applications. It provides a user-friendly interface for viewing logs in real-time, as well as detailed information about log entries.

LogHole Tail Command

The log-hole:tail command allows you to retrieve logs from the database based on specific log levels or date ranges. This command is highly configurable, enabling you to filter logs by level and date range to get precisely the information you need.

Usage

To run the log-hole:tail command, use the following syntax:

Options

The command provides several options to customize the logs you want to retrieve:

Note: If no specific level is selected, the command will default to retrieving logs at the "ALL" level.

Examples

Here are some examples of how to use the log-hole:tail command effectively:

Fetch all logs from the database (without --take tag it will take last 10 logs by default)

Fetch only error-level logs from a specific date range

Fetch only warning-level logs

Fetch critical logs with a limit of 5 entries

Fetch info-level logs from a specific date onwards

Purge all logs from the database

Output

The command displays logs in a table format with the following columns:

A table example is shown below:

Conclusion

LogHole simplifies the logging process in Laravel applications, making it easier to monitor and debug your code. With its powerful features and easy setup, you can enhance your logging experience today.


License

digitaldev-lx/log-hole is open-sourced software licensed under the MIT license.

About DigitalDev

DigitalDev is a web development agency based on Lisbon, Portugal. We specialize in Laravel, Livewire, and Tailwind CSS. Codeboys is our special partner and we work together to deliver the best solutions for our clients.


All versions of log-hole with dependencies

PHP Build Version
Package Version
Requires php Version ^8.2
spatie/laravel-package-tools Version ^1.16
illuminate/contracts Version ^10.0||^11.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package digitaldev-lx/log-hole contains the following files

Loading the files please wait ....