stk2k/stream-logger

View on GitHub
demo/example5.php

Summary

Maintainability
A
0 mins
Test Coverage
<?php
require_once __DIR__ . '/include/autoload.php';

use Stk2k\StreamLogger\SimpleMemoryLogger;

$logger = new SimpleMemoryLogger(PhpStream::OUTPUT);
$logger->debug('Hello, world!');
$logger->warning('Something is wrong...');

$logger = new SimpleMemoryLogger(PhpStream::OUTPUT, null, "<br>\n");
$logger->debug('Hello, world!');
$logger->warning('Something is wrong...');


$logger = new SimpleMemoryLogger(PhpStream::STDERR);
$logger->debug('Hello, world!');
$logger->warning('Something is wrong...');