php.ini の設定により動作が変化します。
| 名前 | デフォルト | 変更可能 | 変更履歴 |
|---|---|---|---|
| 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
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
seaslog.buffer_disabled_in_cli
int
seaslog.buffer_size
int
seaslog.default_basepath
string
seaslog.default_datetime_format
string
seaslog.default_logger
string
seaslog.disting_by_hour
int
注意: 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
注意: 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
注意: 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
注意: 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
注意: 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
LineNo in %F.
Default 0
seaslog.remote_host
string
seaslog.remote_port
int
seaslog.remote_timeout
int
seaslog.throw_exception
int
注意: seaslog.throw_exception = 1 Open an exception that throws the SeasLog to throw itself. When the directory authority or the receive server port is blocked, throw an exception; do not throw an exception when closed.
seaslog.trace_error
int
seaslog.trace_exception
int
seaslog.trace_notice
int
seaslog.trace_warning
int
seaslog.trim_wrap
int
seaslog.use_buffer
int
注意: seaslog.use_buffer = 1 Switch the configure use_buffer on. The use_buffer switch default off. If switch use_buffer on, SeasLog prerecord the log with memory, and them would be rewritten down into the Data Store by request shutdown or php process exit (PHP RSHUTDOWN or PHP MSHUTDOWN).
seaslog.default_template
string
注意: The following default variables are provided, which can be used directly in the log template and replaced as a corresponding value when the log is eventually generated. Default log template is:
seaslog.default_template = "%T | %L | %P | %Q | %t | %M", that's mean,default log style is:{dateTime} | {level} | {pid} | {uniqid} | {timeStamp} | {logInfo}If you custom log template, such as:seaslog.default_template = "[%T]:%L %P %Q %t %M", that's will mean,log style was custom as:[{dateTime}]:{level} {pid} {uniqid} {timeStamp} {logInfo}
Seaslog Default Variable Table Variable Name Description %L Level. %M Message. %T DateTime. Such as 2017-08-16 19:15:02, affected byseaslog.default_datetime_format.%t Timestamp. Such as 1502882102.862,accurate to milliseconds.%Q RequestId. To distinguish a single request, such as not invoking the SeasLog::setRequestId($string)function, the unique value generated by the built-instatic char *get_uniqid ()function is used when the request is initialized.%H HostName. %P ProcessId. %D Domain:Port. Such as www.cloudwise.com:80; When Cli, Such ascli.%R Request URI. Such as /app/user/signin; When Cli it's the index script, Such asCliIndex.php.%m Request Method. Such as Get; When Cli it's the command script, Such as/bin/bash.%I Client IP; When Cli it's local. Priority value: HTTP_X_REAL_IP > HTTP_X_FORWARDED_FOR > REMOTE_ADDR%F FileName:LineNo. Such as UserService.php:118.%U MemoryUsage. byte. Call zend_memory_usage.%u PeakMemoryUsage. byte. Call zend_memory_peak_usage.%C TODOClass::Action. Such asUserService::getUserInfo