Download the PHP package twidpay/twid-logger without Composer
On this page you can find all versions of the php package twidpay/twid-logger. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download twidpay/twid-logger
More information about twidpay/twid-logger
Files in twidpay/twid-logger
Package twid-logger
Short Description Centralized logging package for maintaining consistent logging across projects.
License MIT
Informations about the package twid-logger
Twid Logger
Centralized logging package for maintaining consistent logging across projects.
Installation
You can install this package via Composer:
Configuration
Publish the configuration file using the following artisan command:
This will create a logging.php
file in your config
directory. You can customize this file to define your log channels, metadata, and masked fields.
Laravel Configuration
Alias
Add the following alias to the aliases array in your config/app.php
file:
Provider
Add the following service provider to the providers array in your config/app.php
file:
Lumen Configuration
Alias
Open your bootstrap/app.php
file and add the following alias:
Provider
Open your bootstrap/app.php
file and register the service provider:
Usage
Facade: TLog
This package provides a facade named TLog
for logging messages. You can use this facade to log messages to different channels dynamically.
Example:
If you use a channel name as a method, the facade will log the message to that channel. If the method is not explicitly defined, it is treated as a channel name, and the log method is invoked on the corresponding logger instance.
Logger
The Logger
class is responsible for handling log messages. It's initialized with a log channel, and you can use it to log messages with specific data.
Example:
License
This package is open-source software licensed under the MIT license.