1. Go to this page and download the library: Download mellivora/logger-factory library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
mellivora / logger-factory example snippets
use Mellivora\Logger\LoggerFactory;
use Monolog\Level;
// Create factory instance
$factory = new LoggerFactory();
// Get default logger
$logger = $factory->get();
$logger->info('Hello World!');
// Use specific channel
$apiLogger = $factory->get('api');
$apiLogger->debug('API request processed');
// Using helper functions
mlog('info', 'User logged in', ['user_id' => 123]);
mlog_with('api', 'debug', 'API request');
// Using Facade
use Mellivora\Logger\Laravel\Facades\MLog;
MLog::info('Application started');
MLog::logWith('api', 'debug', 'API debug');
MLog::exception($exception, 'error');