summaryrefslogtreecommitdiff
path: root/vendor/fguillot/simpleLogger/src/SimpleLogger/Stderr.php
blob: 2573177e2d57c40ea8bb9498ba73d5e9f166fea5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
<?php

namespace SimpleLogger;

/**
 * Stderr logger
 *
 * @package SimpleLogger
 * @author  Frédéric Guillot
 */
class Stderr extends Base
{
    /**
     * Logs with an arbitrary level.
     *
     * @param mixed  $level
     * @param string $message
     * @param array  $context
     * @return null
     */
    public function log($level, $message, array $context = array())
    {
        file_put_contents('php://stderr', $this->formatMessage($level, $message, $context), FILE_APPEND);
    }
}