hpz937/logutil

logging utility for php

dev-main 2024-02-07 19:56 UTC

This package is auto-updated.

Last update: 2024-06-07 20:38:33 UTC


README

Logutil is a logging utility for PHP.

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes.

Prerequisites

You need to have PHP installed on your machine. Also, you need to install the dependencies of the project using Composer.

Installation

You can install LogUtil via Composer. Run the following command in your project directory:

composer require hpz937/logutil

Usage

You can use the Log class from the Hpz937\Logutil namespace to log messages. Here's an example:

<?php
use Hpz937\Logutil\Log;

Log::info('This is an informational message');
Log::error('This is an error message');
?>

You can also set the log file path and the execution environment (CLI or not) using the setLogFile and setRunFromCli methods respectively.

Built With

  • adhocore/cli - Command line interface library for PHP

License

This project is licensed under the MIT License - see the LICENSE file for details