改名
This commit is contained in:
+2
-2
@@ -173,8 +173,8 @@ class Kafka extends \Snowflake\Process\Process
|
|||||||
$conf->set('metadata.broker.list', $kafka['brokers']);
|
$conf->set('metadata.broker.list', $kafka['brokers']);
|
||||||
$conf->set('socket.timeout.ms', '30000');
|
$conf->set('socket.timeout.ms', '30000');
|
||||||
|
|
||||||
logger()->debug('kafka listen groupId ' . $kafka['groupId']);
|
debug('kafka listen groupId ' . $kafka['groupId']);
|
||||||
logger()->debug('kafka listen brokers ' . $kafka['brokers']);
|
debug('kafka listen brokers ' . $kafka['brokers']);
|
||||||
|
|
||||||
if (function_exists('pcntl_sigprocmask')) {
|
if (function_exists('pcntl_sigprocmask')) {
|
||||||
pcntl_sigprocmask(SIG_BLOCK, array(SIGIO));
|
pcntl_sigprocmask(SIG_BLOCK, array(SIGIO));
|
||||||
|
|||||||
+3
-7
@@ -30,7 +30,6 @@ class Logger implements LoggerInterface
|
|||||||
/**
|
/**
|
||||||
* @param string $message
|
* @param string $message
|
||||||
* @param array $context
|
* @param array $context
|
||||||
* @throws ComponentException
|
|
||||||
* @throws Exception
|
* @throws Exception
|
||||||
*/
|
*/
|
||||||
public function alert(mixed $message, array $context = array())
|
public function alert(mixed $message, array $context = array())
|
||||||
@@ -48,7 +47,6 @@ class Logger implements LoggerInterface
|
|||||||
/**
|
/**
|
||||||
* @param string $message
|
* @param string $message
|
||||||
* @param array $context
|
* @param array $context
|
||||||
* @throws ComponentException
|
|
||||||
* @throws Exception
|
* @throws Exception
|
||||||
*/
|
*/
|
||||||
public function error(mixed $message, array $context = array())
|
public function error(mixed $message, array $context = array())
|
||||||
@@ -60,7 +58,7 @@ class Logger implements LoggerInterface
|
|||||||
/**
|
/**
|
||||||
* @param string $message
|
* @param string $message
|
||||||
* @param array $context
|
* @param array $context
|
||||||
* @throws ComponentException
|
* @throws Exception
|
||||||
*/
|
*/
|
||||||
public function warning(mixed $message, array $context = array())
|
public function warning(mixed $message, array $context = array())
|
||||||
{
|
{
|
||||||
@@ -71,7 +69,7 @@ class Logger implements LoggerInterface
|
|||||||
/**
|
/**
|
||||||
* @param string $message
|
* @param string $message
|
||||||
* @param array $context
|
* @param array $context
|
||||||
* @throws ComponentException
|
* @throws Exception
|
||||||
*/
|
*/
|
||||||
public function notice(mixed $message, array $context = array())
|
public function notice(mixed $message, array $context = array())
|
||||||
{
|
{
|
||||||
@@ -82,7 +80,7 @@ class Logger implements LoggerInterface
|
|||||||
/**
|
/**
|
||||||
* @param string $message
|
* @param string $message
|
||||||
* @param array $context
|
* @param array $context
|
||||||
* @throws ComponentException
|
* @throws Exception
|
||||||
*/
|
*/
|
||||||
public function info(mixed $message, array $context = array())
|
public function info(mixed $message, array $context = array())
|
||||||
{
|
{
|
||||||
@@ -94,7 +92,6 @@ class Logger implements LoggerInterface
|
|||||||
/**
|
/**
|
||||||
* @param string $message
|
* @param string $message
|
||||||
* @param array $context
|
* @param array $context
|
||||||
* @throws ComponentException
|
|
||||||
* @throws Exception
|
* @throws Exception
|
||||||
*/
|
*/
|
||||||
public function debug(mixed $message, array $context = array())
|
public function debug(mixed $message, array $context = array())
|
||||||
@@ -107,7 +104,6 @@ class Logger implements LoggerInterface
|
|||||||
* @param $level
|
* @param $level
|
||||||
* @param $message
|
* @param $message
|
||||||
* @param array $context
|
* @param array $context
|
||||||
* @throws ComponentException
|
|
||||||
* @throws Exception
|
* @throws Exception
|
||||||
*/
|
*/
|
||||||
public function log($level, mixed $message, array $context = array())
|
public function log($level, mixed $message, array $context = array())
|
||||||
|
|||||||
@@ -282,8 +282,7 @@ class ServerInotify extends Process
|
|||||||
if (str_contains($message, 'The file descriptor is not an inotify instance')) {
|
if (str_contains($message, 'The file descriptor is not an inotify instance')) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
logger()->debug('Error:' . $message);
|
debug('Error:' . $message . ' at ' . $file . ':' . $line);
|
||||||
logger()->debug($file . ':' . $line);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
+42
-1
@@ -848,7 +848,6 @@ if (!function_exists('swoole_substr_json_decode')) {
|
|||||||
|
|
||||||
if (!function_exists('swoole_substr_unserialize')) {
|
if (!function_exists('swoole_substr_unserialize')) {
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param $packet
|
* @param $packet
|
||||||
* @param int $length
|
* @param int $length
|
||||||
@@ -860,3 +859,45 @@ if (!function_exists('swoole_substr_unserialize')) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (!function_exists('debug')) {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param $message
|
||||||
|
* @param string $method
|
||||||
|
* @throws Exception
|
||||||
|
*/
|
||||||
|
function debug(mixed $message, string $method = 'app')
|
||||||
|
{
|
||||||
|
Snowflake::app()->debug($message, $method);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!function_exists('error')) {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param $message
|
||||||
|
* @param string $method
|
||||||
|
* @throws Exception
|
||||||
|
*/
|
||||||
|
function error(mixed $message, $method = 'error')
|
||||||
|
{
|
||||||
|
Snowflake::app()->error($message, $method);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!function_exists('success')) {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param $message
|
||||||
|
* @param string $method
|
||||||
|
* @throws Exception
|
||||||
|
*/
|
||||||
|
function success(mixed $message, $method = 'app')
|
||||||
|
{
|
||||||
|
Snowflake::app()->success($message, $method);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user