Download the PHP package mrmmg/laravel_loggify without Composer

On this page you can find all versions of the php package mrmmg/laravel_loggify. 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 laravel_loggify

Loggify

Managing Laravel Logs with Tags and Enhanced Options.

The meaning

Based on ChatGPT response "Loggify" is not a standard word in the English language, and it doesn't have an established definition. you can define it as something like: To streamline or enhance the process of creating and managing logs or records, especially in a digital or data-driven context. This may involve automating log generation, improving log organization, or making logs more user-friendly for analysis and monitoring purposes.

What do this package?

This package assists Laravel developers in storing application logs in a Redis database (currently supported) and provides a convenient system for categorizing these logs using tags. This allows developers to easily navigate through logs based on their assigned tags.

Getting Started

Before Install

Since this package utilizes Redis to store and manage logs, it's important to configure Laravel to work seamlessly with Redis. Additionally, make sure to install the necessary Redis requirements for Laravel, such as predis.

Installation

Next, you'll need to publish the Loggify assets and configuration by running:

This command create loggify.php configuration file in config directory and create loggify assets in public/verndor/loggify.

Configuration

The loggify.php configuration file is self-documented with comment blocks. Nevertheless, I will provide an explanation for clarity:

Database and Redis

Similar to Laravel config/database.php, this section describes the Redis connection settings, which you can customize to fit your requirements. By default, all logs are stored in Redis database 10.

Log Expiration

Redis is an in-memory database, and it's crucial to manage memory usage for logs. Therefore, you can specify how many seconds Redis should retain log items. By default, log items are retained for 1 day, which equals 86,400 seconds.

Tag Expiration

This option controls whether tags must expire or not. If you set it to a positive number, it indicates the number of seconds each tag can remain in the database. By default, it is set to false, which means logs will not expire.

Log Tag Limits

This option will control how many log items each log tag can hold.

Pagination Limit

This option will control web panel each page max items. Default value is 100.

Usage

By using the Laravel Log Facade, you can integrate Loggify.

Examples

Where are the enhanced options?

The second parameter of Laravel log methods, referred to as context, is leveraged by Loggify to manage both log 'tags' and 'extra' log data. Let's continue with the previous example:

Great! You've successfully created a log tagged with MY_CUSTOM_TAG. You can use as many tags as you need; there are no set limits.

To add extra data to the log context:

Other elements within the context are stored under the context key in the log stack, following the default Laravel behavior.

In the above example, the request_data is stored in the context, while the tags and extra are stored in other parts of the log.

Trace System

Loggify can assist you in debugging and identifying issues within your application by automatically storing the PHP debug backtrace feature. You don't need to take any additional steps; Loggify stores the backtrace for logs of the following types:

Examples

All the log examples mentioned above store the debug backtrace in the database, and you can view them in the Loggify web panel.

The Default Tags

By default, Loggify add two tags to your tags, ALL_LOGS and LOG_TYPE_{laravel_log_type}. for example:

The log mentioned above can be located in the web panel by filtering with the ALL_LOGS, LOG_TYPE_INFO, and INFO tags.

Web Panel

To view the stored logs, open a web browser and navigate to the yourappurl.example/loggify route.

Filter Tag Logs

By passing the log tag after that url the Loggify shows the tag logs, for example yourappurl.example/loggify/ALERT show all logs that tagged with ALERT tag.

Result Limit

By passing a ?limit=number to Loggify route, you can control how many items must be show in web panel, for example if you set yourappurl.example/loggify?limit=1000 the latest 1000 elements shown in panel.

Web Panel Authorization

As logs can contain sensitive data, access control for the Loggify panel can be managed by the following gate in a production environment:

Note: A suitable place to add this gate is in the AuthServiceProvider within the app/Providers directory.

The closure function accepts a single argument, which is the authenticated user object. You can utilize this object to determine whether the user can access the /loggify route or not. Please keep in mind that the closure must return a boolean.

Screenshots

Dark/Light Theme

Log with Trace

Tags Information

I need your help 🤝

We welcome contributions from the community to help enhance this package further. If you'd like to collaborate and make it even better, please feel free to get involved.

Todo


All versions of laravel_loggify with dependencies

PHP Build Version
Package Version
Requires php Version ^8.0.2
illuminate/redis Version >=9.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 mrmmg/laravel_loggify contains the following files

Loading the files please wait ....