summaryrefslogtreecommitdiff
path: root/vendor/fguillot/simpleLogger/src/SimpleLogger/Stdout.php
blob: 82d181b2878370f1e3d645f841d1851c9cce3d58 (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;

/**
 * Stdout logger
 *
 * @package SimpleLogger
 * @author  Frédéric Guillot
 */
class Stdout 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://stdout', $this->formatMessage($level, $message, $context), FILE_APPEND);
    }
}