2017 © Pedro Peláez
 

library log

Non-blocking logging for PHP based on Amp and Monolog.

image

amphp/log

Non-blocking logging for PHP based on Amp and Monolog.

  • Thursday, March 22, 2018
  • by Trowski
  • Repository
  • 4 Watchers
  • 5 Stars
  • 2,270 Installations
  • PHP
  • 13 Dependents
  • 1 Suggesters
  • 0 Forks
  • 0 Open issues
  • 2 Versions
  • 101 % Grown

The README.md

amphp/log

AMPHP is a collection of event-driven libraries for PHP designed with fibers and concurrency in mind. amphp/log provides a non-blocking stream handler for monolog/monolog., (*1)

Release License, (*2)

Installation

This package can be installed as a Composer dependency., (*3)

composer require amphp/log

Usage

<?php

use Amp\ByteStream;
use Amp\Log\ConsoleFormatter;
use Amp\Log\StreamHandler;
use Monolog\Logger;

require dirname(__DIR__) . '/vendor/autoload.php';

// You can also log to a file using amphp/file:
// $handler = new StreamHandler(File\openFile(__DIR__ . '/example.log', 'w'));

// Here we'll log to the standard output stream of the current process:
$handler = new StreamHandler(ByteStream\getStdout());
$handler->setFormatter(new ConsoleFormatter);

$logger = new Logger('main');
$logger->pushHandler($handler);

$logger->debug("Hello, world!");
$logger->info("Hello, world!");
$logger->notice("Hello, world!");
$logger->error("Hello, world!");
$logger->alert("Hello, world!");

The Versions

22/03 2018

dev-master

9999999-dev https://github.com/amphp/log

Non-blocking logging for PHP based on Amp and Monolog.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Aaron Piotrowski

logger log logging async non-blocking amp amphp

22/03 2018

v1.0.0

1.0.0.0 https://github.com/amphp/log

Non-blocking logging for PHP based on Amp and Monolog.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Aaron Piotrowski

logger log logging async non-blocking amp amphp