PHPのお勉強!

PHP TOP

実行時設定

php.ini の設定により動作が変化します。

Seaslog 設定オプション
名前 デフォルト 変更可能 変更履歴
seaslog.appender 1 INI_SYSTEM
seaslog.appender_retry 0 INI_ALL
seaslog.level 8 INI_ALL
seaslog.remote_host 127.0.0.1 INI_ALL
seaslog.remote_port 514 INI_ALL
seaslog.remote_timeout 1 INI_SYSTEM
seaslog.default_basepath /var/log/www INI_SYSTEM
seaslog.default_logger default INI_SYSTEM
seaslog.default_template %T | %L | %P | %Q | %t | %M INI_SYSTEM
seaslog.default_datetime_format Y-m-d H:i:s INI_SYSTEM
seaslog.trace_error 1 INI_ALL
seaslog.trace_exception 0 INI_SYSTEM
seaslog.trace_notice 0 INI_ALL
seaslog.trace_warning 0 INI_ALL
seaslog.use_buffer 0 INI_SYSTEM
seaslog.buffer_size 0 INI_ALL
seaslog.buffer_disabled_in_cli 0 INI_SYSTEM
seaslog.disting_type 0 INI_SYSTEM
seaslog.disting_folder 1 INI_SYSTEM
seaslog.disting_by_hour 0 INI_SYSTEM
seaslog.recall_depth 0 INI_ALL
seaslog.trim_wrap 0 INI_ALL
seaslog.ignore_warning 1 INI_ALL
seaslog.throw_exception 1 INI_ALL

以下に設定ディレクティブに関する 簡単な説明を示します。

seaslog.appender int

Switch the Record Log Data Store. 1File 2TCP 3UDP (Switch default 1)

SeasLog will send log to tcp://remote_host:remote_port or udp://remote_host:remote_port server, when seaslog.appender configured to 2 (TCP) or 3 (UDP).

When SeasLog send log to TCP/UDP,style follow RFC5424. The {logInfo} affected by seaslog.default_template.

The log style finally formatted such as:
<15>1 2017-08-27T01:24:59+08:00 vagrant-ubuntu-trusty test/logger[27171]: 2016-06-25 00:59:43 | DEBUG | 21423 | 599157af4e937 | 1466787583.322 | this is a neeke debug
<14>1 2017-08-27T01:24:59+08:00 vagrant-ubuntu-trusty test/logger[27171]: 2016-06-25 00:59:43 | INFO | 21423 | 599157af4e937 | 1466787583.323 | this is a info log
<13>1 2017-08-27T01:24:59+08:00 vagrant-ubuntu-trusty test/logger[27171]: 2016-06-25 00:59:43 | NOTICE | 21423 | 599157af4e937 | 1466787583.324 | this is a notice log
    
seaslog.appender_retry int

Record Log Retry Count. Default 0 (Do Not Retry)

seaslog.buffer_disabled_in_cli int

Disable buffer in cli. 1-Y 0-N(Default)

Switch the configure buffer_disabled_in_cli on. The buffer_disabled_in_cli switch default off. If switch buffer_disabled_in_cli on, and running in cli, seaslog.use_buffer setting will be discarded, Seaslog write to the Data Store IMMEDIATELY.

seaslog.buffer_size int

Configure the buffer_size with 100. The buffer_size default 0, it’s meaning don’t use buffer. If buffer_size > 0,SeasLog will rewritten down into the Data Store when the prerecorded log in memory count >= this buffer_size,and then refresh the memory poll.

seaslog.default_basepath string

Default Log Base Path. Defult "/var/log/www".

seaslog.default_datetime_format string

The DateTime Style. Default "Y-m-d H:i:s".

seaslog.default_logger string

Default Logger Path. Default "default".

seaslog.disting_by_hour int

Switch use the logger with hour. 1-Y 0-N(Default)

注意:

seaslog.disting_by_hour = 1 Switch use Logger DisTing by hour. It’s meaning SeasLog will create the file each one hour.

seaslog.disting_folder int

Switch use the logger with folder. 1-Y(Default) 0-N

注意:

seaslog.disting_folder = 1 Switch use Logger DisTing by folder, it’s meaning SeasLog will create the file deistic by folder, and when this configure close SeasLog will create file use underline connect Logger and Time like default_20180211.log.

seaslog.disting_type int

Switch use the logger with type. 1-Y 0-N(Default)

注意:

seaslog.disting_type = 1 Switch use Logger DisTing by type, it’s meaning SeasLog will create the file deistic info\warn\error and the other type.

seaslog.ignore_warning int

Switch ignore SeasLog warning. 1-On(Default) 0-Off

注意:

seaslog.ignore_warning = 1 Open a warning to ignore SeasLog itself. When directory permissions or receive server ports are blocked, they are ignored; when closed, a warning is thrown.

seaslog.level int

Record logger level. Default 8 (All of them). 0-EMERGENCY 1-ALERT 2-CRITICAL 3-ERROR 4-WARNING 5-NOTICE 6-INFO 7-DEBUG 8-ALL

注意:

Tips: The configuration item has changed since the 1.7.0 version. Before the 1.7.0 version, the smaller the value, the more logs are taken according to the level: 0-all 1-debug 2-info 3-notice 4-warning 5-error 6-critical 7-alert 8-emergency Before the 1.7.0 version, Default 0 (All of them).

seaslog.recall_depth int

Log function recall depth.Will affected variable LineNo in %F. Default 0

seaslog.remote_host string

If you use Record TCP or UDP, configure this remote ip. Default "127.0.0.1"

seaslog.remote_port int

If you use Record TCP or UDP, configure this remote port. Default 514

seaslog.remote_timeout int

If you use Record TCP or UDP, configure this remote timeout. Default 1 second