Download the PHP package mdabagh/generatelog without Composer

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

GenerateLog

With the GenerateLog package, you can easily and accurately store your program logs in both database and storage. This package provides the ability to customize log information, such as adding IP addresses, user information, and executed file information to your logs.

Additionally, you can easily set your log level in the env file. For example, you can temporarily disable info logs and later reactivate them as needed.

The GenerateLog package offers customizable features, ease of use, and the ability to manage program logs with precision and high quality.

Features

Installation

To install the package, simply run the following command:

Usage

To use the package, you need to include the GLogFactory class in your code:

Then, you can call the make method to generate a log file:

The make method takes six parameters:

Configuration

To configure GenerateLog, you can set the following environment variables in the .env file of your Laravel application:

GLOG_STATE_ACTIVE

This variable specifies whether to use the database (db), the file system (storage), or both (dbAndStorage) to store log files. By default, it is set to storage.

When GLOG_STATE_ACTIVE is set to storage, GenerateLog uses Laravel's built-in logging functionality to generate log files. The config/logging.php file in your Laravel application specifies the location and format of the log files.

By default, Laravel stores log files in the storage/logs directory. You can change this location by modifying the path option in the config/logging.php file. For example, to store log files in a subdirectory called logs under the storage/app directory, you can change the path option as follows:

You can also change the format of the log files by modifying the channels option in the config/logging.php file. For example, to log messages in JSON format, you can add a new channel as follows:

Then, you can set GLOG_STATE_ACTIVE to storage in your .env file to enable logging to the file system:

If you want to use the database to store log files, you can set GLOG_STATE_ACTIVE to db. In this case, you also need to run the Logging migration to create the necessary database table:

GLOG_TYPE_INFO_ACTIVE, GLOG_TYPE_WARNING_ACTIVE, GLOG_TYPE_DEBUG_ACTIVE, GLOG_TYPE_ERROR_ACTIVE

These variables specify whether to log messages of a particular type (info, warning, debug, or error). By default, all types are set to true.

Example usage:

Note that if you change the value of any of these environment variables, you may need to restart your application for the changes to take effect.

References

License

GenerateLog is open-sourced software licensed under the MIT license.


All versions of generatelog with dependencies

PHP Build Version
Package Version
No informations.
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 mdabagh/generatelog contains the following files

Loading the files please wait ....