mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 03:18:26 +00:00
Extracting CakeLogInterface to its own file, this fixes the FileLog test case
This commit is contained in:
parent
e81ff384c7
commit
1ada281e14
3 changed files with 21 additions and 16 deletions
|
@ -36,22 +36,6 @@
|
||||||
define('LOG_INFO', 6);
|
define('LOG_INFO', 6);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* CakeLogStreamInterface is the interface that should be implemented
|
|
||||||
* by all classes that are going to be used as Log streams.
|
|
||||||
*
|
|
||||||
* @package cake.libs
|
|
||||||
*/
|
|
||||||
interface CakeLogInterface {
|
|
||||||
/**
|
|
||||||
* Write method to handle writes being made to the Logger
|
|
||||||
*
|
|
||||||
* @param string $type
|
|
||||||
* @param string $message
|
|
||||||
* @return void
|
|
||||||
*/
|
|
||||||
public function write($type, $message);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Logs messages to configured Log adapters. One or more adapters can be configured
|
* Logs messages to configured Log adapters. One or more adapters can be configured
|
||||||
|
|
18
lib/Cake/Log/CakeLogInterface.php
Normal file
18
lib/Cake/Log/CakeLogInterface.php
Normal file
|
@ -0,0 +1,18 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
/**
|
||||||
|
* CakeLogStreamInterface is the interface that should be implemented
|
||||||
|
* by all classes that are going to be used as Log streams.
|
||||||
|
*
|
||||||
|
* @package cake.libs
|
||||||
|
*/
|
||||||
|
interface CakeLogInterface {
|
||||||
|
/**
|
||||||
|
* Write method to handle writes being made to the Logger
|
||||||
|
*
|
||||||
|
* @param string $type
|
||||||
|
* @param string $message
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function write($type, $message);
|
||||||
|
}
|
|
@ -17,6 +17,9 @@
|
||||||
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
|
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
App::uses('CakeLogInterface', 'Log');
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* File Storage stream for Logging. Writes logs to different files
|
* File Storage stream for Logging. Writes logs to different files
|
||||||
* based on the type of log it is.
|
* based on the type of log it is.
|
||||||
|
|
Loading…
Reference in a new issue