1 | <?php |
||
20 | class Laravel5 |
||
21 | extends \Aimeos\MW\Logger\Base |
||
22 | implements \Aimeos\MW\Logger\Iface |
||
23 | { |
||
24 | private $logger = null; |
||
25 | |||
26 | |||
27 | /** |
||
28 | * Initializes the logger object. |
||
29 | * |
||
30 | * @param \Illuminate\Contracts\Logging\Log $logger Laravel logger object |
||
31 | */ |
||
32 | public function __construct( \Illuminate\Contracts\Logging\Log $logger ) |
||
36 | |||
37 | |||
38 | /** |
||
39 | * Writes a message to the configured log facility. |
||
40 | * |
||
41 | * @param string $message Message text that should be written to the log facility |
||
42 | * @param integer $priority Priority of the message for filtering |
||
43 | * @param string $facility Facility for logging different types of messages (e.g. message, auth, user, changelog) |
||
44 | * @throws \Aimeos\MW\Logger\Exception If an error occurs in Zend_Log |
||
45 | * @see \Aimeos\MW\Logger\Base for available log level constants |
||
46 | */ |
||
47 | public function log( $message, $priority = \Aimeos\MW\Logger\Base::ERR, $facility = 'message' ) |
||
61 | |||
62 | |||
63 | /** |
||
64 | * Translates the log priority to the log levels of Monolog. |
||
65 | * |
||
66 | * @param integer $priority Log level from \Aimeos\MW\Logger\Base |
||
67 | * @return integer Log level from Monolog\Logger |
||
68 | * @throws \Aimeos\MW\Logger\Exception If log level is unknown |
||
69 | */ |
||
70 | protected function translatePriority( $priority ) |
||
94 | } |