blob: 6fb8e85f6aab0b6a868ba0794dcaef0e30ed87c3 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
<?php
/**
* Simple helper to log things to the console.
*
* @author Niklas Laxström
* @license GPL-2.0-or-later
* @file
*/
use Psr\Log\AbstractLogger;
class TranslateCliLogger extends AbstractLogger {
public function __construct( callable $logger ) {
$this->logger = $logger;
}
public function log( $level, $msg, array $context = [] ) {
( $this->logger )( "LOG $level: $msg" );
}
}
|