v1.1.1 2024-05-20 03:12 UTC

This package is auto-updated.

Last update: 2024-12-26 02:43:33 UTC


README

Install

composer require friendsofwebso/log

Quick Start

Case 1

\Webso\Log::make($yourLogPath)->info('Info');

Case 2

// Before add path in file config

\Webso\Log::info('message', ['data' => $something]);

// Log::debug('message', ['data' => $something]);
// Log::info('message', ['data' => $something]);
// Log::notice('message', ['data' => $something]);
// Log::warning('message', ['data' => $something]);
// Log::error('message', ['data' => $something]);
// Log::critical('message', ['data' => $something]);
// Log::alert('message', ['data' => $something]);
// Log::emergency('message', ['data' => $something]);

Optional - Use with ErrorHandler

ErrorHandler::register()->setDefaultLogger(
    \Webso\Log::make('path/file.log'),
    (E_ERROR | E_PARSE)
);