diff --git a/README.md b/README.md index a3e182b..6a4c3f9 100644 --- a/README.md +++ b/README.md @@ -20,6 +20,7 @@ An effective,fast,stable log extension for PHP - **[Constants and functions](#constants-and-functions)** - [Constant list](#constant-list) - [Function list](#function-list) + - **[PHP Re result](#php-re-result)** - **[The useage of seaslog logger](#the-useage-of-seaslog-logger)** - [Get and set base path](#get-and-set-base-path) - [Get and set logger](#get-and-set-logger) @@ -388,6 +389,251 @@ class SeasLog ``` +### PHP Re result + +```php +/usr/local/php/php-7.0.6-zts-debug/bin/php --re seaslog + +Extension [ extension #32 SeasLog version 1.6.9 ] { + + - Dependencies { + } + + - INI { + Entry [ seaslog.default_basepath ] + Current = '/var/log/www' + } + Entry [ seaslog.default_logger ] + Current = 'defauult' + } + Entry [ seaslog.default_datetime_format ] + Current = 'Y:m:d H:i:s' + } + Entry [ seaslog.disting_type ] + Current = '0' + } + Entry [ seaslog.disting_by_hour ] + Current = '0' + } + Entry [ seaslog.use_buffer ] + Current = '1' + } + Entry [ seaslog.trace_error ] + Current = '1' + } + Entry [ seaslog.trace_exception ] + Current = '1' + } + Entry [ seaslog.buffer_size ] + Current = '10' + } + Entry [ seaslog.level ] + Current = '0' + } + Entry [ seaslog.appender ] + Current = '1' + } + Entry [ seaslog.remote_host ] + Current = '127.0.0.1' + } + Entry [ seaslog.remote_port ] + Current = '514' + } + } + + - Constants [16] { + Constant [ string SEASLOG_VERSION ] { 1.6.9 } + Constant [ string SEASLOG_AUTHOR ] { Chitao.Gao [ neeke@php.net ] } + Constant [ string SEASLOG_ALL ] { all } + Constant [ string SEASLOG_DEBUG ] { debug } + Constant [ string SEASLOG_INFO ] { info } + Constant [ string SEASLOG_NOTICE ] { notice } + Constant [ string SEASLOG_WARNING ] { warning } + Constant [ string SEASLOG_ERROR ] { error } + Constant [ string SEASLOG_CRITICAL ] { critical } + Constant [ string SEASLOG_ALERT ] { alert } + Constant [ string SEASLOG_EMERGENCY ] { emergency } + Constant [ integer SEASLOG_DETAIL_ORDER_ASC ] { 1 } + Constant [ integer SEASLOG_DETAIL_ORDER_DESC ] { 2 } + Constant [ integer SEASLOG_APPENDER_FILE ] { 1 } + Constant [ integer SEASLOG_APPENDER_TCP ] { 2 } + Constant [ integer SEASLOG_APPENDER_UDP ] { 3 } + } + + - Functions { + Function [ function seaslog_get_version ] { + } + Function [ function seaslog_get_author ] { + } + } + + - Classes [1] { + Class [ class SeasLog ] { + + - Constants [0] { + } + + - Static properties [0] { + } + + - Static methods [19] { + Method [ static public method setBasePath ] { + + - Parameters [1] { + Parameter #0 [ $base_path ] + } + } + + Method [ static public method getBasePath ] { + } + + Method [ static public method setLogger ] { + + - Parameters [1] { + Parameter #0 [ $logger ] + } + } + + Method [ static public method getLastLogger ] { + } + + Method [ static public method setDatetimeFormat ] { + + - Parameters [1] { + Parameter #0 [ $format ] + } + } + + Method [ static public method getDatetimeFormat ] { + } + + Method [ static public method analyzerCount ] { + + - Parameters [3] { + Parameter #0 [ $level ] + Parameter #1 [ $log_path ] + Parameter #2 [ $key_word ] + } + } + + Method [ static public method analyzerDetail ] { + + - Parameters [6] { + Parameter #0 [ $level ] + Parameter #1 [ $log_path ] + Parameter #2 [ $key_word ] + Parameter #3 [ $start ] + Parameter #4 [ $limit ] + Parameter #5 [ $order ] + } + } + + Method [ static public method getBuffer ] { + } + + Method [ static public method flushBuffer ] { + } + + Method [ static public method log ] { + + - Parameters [4] { + Parameter #0 [ $level ] + Parameter #1 [ $message ] + Parameter #2 [ $content ] + Parameter #3 [ $logger ] + } + } + + Method [ static public method debug ] { + + - Parameters [3] { + Parameter #0 [ $message ] + Parameter #1 [ $content ] + Parameter #2 [ $logger ] + } + } + + Method [ static public method info ] { + + - Parameters [3] { + Parameter #0 [ $message ] + Parameter #1 [ $content ] + Parameter #2 [ $logger ] + } + } + + Method [ static public method notice ] { + + - Parameters [3] { + Parameter #0 [ $message ] + Parameter #1 [ $content ] + Parameter #2 [ $logger ] + } + } + + Method [ static public method warning ] { + + - Parameters [3] { + Parameter #0 [ $message ] + Parameter #1 [ $content ] + Parameter #2 [ $logger ] + } + } + + Method [ static public method error ] { + + - Parameters [3] { + Parameter #0 [ $message ] + Parameter #1 [ $content ] + Parameter #2 [ $logger ] + } + } + + Method [ static public method critical ] { + + - Parameters [3] { + Parameter #0 [ $message ] + Parameter #1 [ $content ] + Parameter #2 [ $logger ] + } + } + + Method [ static public method alert ] { + + - Parameters [3] { + Parameter #0 [ $message ] + Parameter #1 [ $content ] + Parameter #2 [ $logger ] + } + } + + Method [ static public method emergency ] { + + - Parameters [3] { + Parameter #0 [ $message ] + Parameter #1 [ $content ] + Parameter #2 [ $logger ] + } + } + } + + - Properties [0] { + } + + - Methods [2] { + Method [ public method __construct ] { + } + + Method [ public method __destruct ] { + } + } + } + } +} + +``` + + ### The useage of seaslog logger #### Get and set base path ```php diff --git a/README_zh.md b/README_zh.md index b1fc8a7..23d62f5 100644 --- a/README_zh.md +++ b/README_zh.md @@ -22,6 +22,7 @@ An effective,fast,stable log extension for PHP - **[常量与函数](#常量与函数)** - [常量列表](#常量列表) - [函数列表](#函数列表) + - **[PHP Re 结果](#php-re-结果)** - **[SeasLog Logger的使用](#seaslog-logger的使用)** - [获取与设置basePath](#获取与设置basepath) - [设置logger与获取lastLogger](#设置logger与获取lastlogger) @@ -388,6 +389,251 @@ class SeasLog ``` +### PHP Re 结果 + +```php +/usr/local/php/php-7.0.6-zts-debug/bin/php --re seaslog + +Extension [ extension #32 SeasLog version 1.6.9 ] { + + - Dependencies { + } + + - INI { + Entry [ seaslog.default_basepath ] + Current = '/var/log/www' + } + Entry [ seaslog.default_logger ] + Current = 'defauult' + } + Entry [ seaslog.default_datetime_format ] + Current = 'Y:m:d H:i:s' + } + Entry [ seaslog.disting_type ] + Current = '0' + } + Entry [ seaslog.disting_by_hour ] + Current = '0' + } + Entry [ seaslog.use_buffer ] + Current = '1' + } + Entry [ seaslog.trace_error ] + Current = '1' + } + Entry [ seaslog.trace_exception ] + Current = '1' + } + Entry [ seaslog.buffer_size ] + Current = '10' + } + Entry [ seaslog.level ] + Current = '0' + } + Entry [ seaslog.appender ] + Current = '1' + } + Entry [ seaslog.remote_host ] + Current = '127.0.0.1' + } + Entry [ seaslog.remote_port ] + Current = '514' + } + } + + - Constants [16] { + Constant [ string SEASLOG_VERSION ] { 1.6.9 } + Constant [ string SEASLOG_AUTHOR ] { Chitao.Gao [ neeke@php.net ] } + Constant [ string SEASLOG_ALL ] { all } + Constant [ string SEASLOG_DEBUG ] { debug } + Constant [ string SEASLOG_INFO ] { info } + Constant [ string SEASLOG_NOTICE ] { notice } + Constant [ string SEASLOG_WARNING ] { warning } + Constant [ string SEASLOG_ERROR ] { error } + Constant [ string SEASLOG_CRITICAL ] { critical } + Constant [ string SEASLOG_ALERT ] { alert } + Constant [ string SEASLOG_EMERGENCY ] { emergency } + Constant [ integer SEASLOG_DETAIL_ORDER_ASC ] { 1 } + Constant [ integer SEASLOG_DETAIL_ORDER_DESC ] { 2 } + Constant [ integer SEASLOG_APPENDER_FILE ] { 1 } + Constant [ integer SEASLOG_APPENDER_TCP ] { 2 } + Constant [ integer SEASLOG_APPENDER_UDP ] { 3 } + } + + - Functions { + Function [ function seaslog_get_version ] { + } + Function [ function seaslog_get_author ] { + } + } + + - Classes [1] { + Class [ class SeasLog ] { + + - Constants [0] { + } + + - Static properties [0] { + } + + - Static methods [19] { + Method [ static public method setBasePath ] { + + - Parameters [1] { + Parameter #0 [ $base_path ] + } + } + + Method [ static public method getBasePath ] { + } + + Method [ static public method setLogger ] { + + - Parameters [1] { + Parameter #0 [ $logger ] + } + } + + Method [ static public method getLastLogger ] { + } + + Method [ static public method setDatetimeFormat ] { + + - Parameters [1] { + Parameter #0 [ $format ] + } + } + + Method [ static public method getDatetimeFormat ] { + } + + Method [ static public method analyzerCount ] { + + - Parameters [3] { + Parameter #0 [ $level ] + Parameter #1 [ $log_path ] + Parameter #2 [ $key_word ] + } + } + + Method [ static public method analyzerDetail ] { + + - Parameters [6] { + Parameter #0 [ $level ] + Parameter #1 [ $log_path ] + Parameter #2 [ $key_word ] + Parameter #3 [ $start ] + Parameter #4 [ $limit ] + Parameter #5 [ $order ] + } + } + + Method [ static public method getBuffer ] { + } + + Method [ static public method flushBuffer ] { + } + + Method [ static public method log ] { + + - Parameters [4] { + Parameter #0 [ $level ] + Parameter #1 [ $message ] + Parameter #2 [ $content ] + Parameter #3 [ $logger ] + } + } + + Method [ static public method debug ] { + + - Parameters [3] { + Parameter #0 [ $message ] + Parameter #1 [ $content ] + Parameter #2 [ $logger ] + } + } + + Method [ static public method info ] { + + - Parameters [3] { + Parameter #0 [ $message ] + Parameter #1 [ $content ] + Parameter #2 [ $logger ] + } + } + + Method [ static public method notice ] { + + - Parameters [3] { + Parameter #0 [ $message ] + Parameter #1 [ $content ] + Parameter #2 [ $logger ] + } + } + + Method [ static public method warning ] { + + - Parameters [3] { + Parameter #0 [ $message ] + Parameter #1 [ $content ] + Parameter #2 [ $logger ] + } + } + + Method [ static public method error ] { + + - Parameters [3] { + Parameter #0 [ $message ] + Parameter #1 [ $content ] + Parameter #2 [ $logger ] + } + } + + Method [ static public method critical ] { + + - Parameters [3] { + Parameter #0 [ $message ] + Parameter #1 [ $content ] + Parameter #2 [ $logger ] + } + } + + Method [ static public method alert ] { + + - Parameters [3] { + Parameter #0 [ $message ] + Parameter #1 [ $content ] + Parameter #2 [ $logger ] + } + } + + Method [ static public method emergency ] { + + - Parameters [3] { + Parameter #0 [ $message ] + Parameter #1 [ $content ] + Parameter #2 [ $logger ] + } + } + } + + - Properties [0] { + } + + - Methods [2] { + Method [ public method __construct ] { + } + + Method [ public method __destruct ] { + } + } + } + } +} + +``` + + ### SeasLog Logger的使用 #### 获取与设置basePath ```php